Git Product home page Git Product logo

Comments (5)

martinohanlon avatar martinohanlon commented on June 28, 2024 1

I can give you some pointers but I am not going to be able to make this change. The whole point of blue dot is that it is a simple interface with 1 function, it is a solution to get started.

If you look at the button activity in the BlueDot:

https://github.com/martinohanlon/BlueDot/blob/master/clients/android/app/src/main/java/com/stuffaboutcode/bluedot/Button.java

  1. It creates a connection to bluetooth

  2. When touch events are detected it calls pressed, released, moved functions

  3. These functions construct a message which conforms to the format [operator], [x], [y]\n

  4. They then use the send function to pass the message to the server

These messages end up being managed by dot.py in bluedot python library
https://github.com/martinohanlon/BlueDot/blob/master/bluedot/dot.py:

  1. When the server receives data from the client it passes it to BlueDot._data_received

  2. _data_received makes sure only complete messages (those which end in \n) are processed and passes them to _process_commands

  3. _process_commands splits the command into its component parts (operator, x, y) and calls the relevant function to state whether it was pressed, moved, released.

You could feasibly change the app to send a new message with a different operator and modify _process_commands to process that new operator in whatever way you wanted.

I hope that helps.

from bluedot.

martinohanlon avatar martinohanlon commented on June 28, 2024

What additional data do you want to send?

from bluedot.

Stamenov96 avatar Stamenov96 commented on June 28, 2024

A string type data, for example Name of the home wi-fi Network and it's password.

from bluedot.

Stamenov96 avatar Stamenov96 commented on June 28, 2024

It's me again 😆
I've changed some things in the android app so I send a command with code 3.
I've added the case 3 in dot.py and i think it should work, but how can I recompile the project and installing it. I've tried with
setup.py clean
setup.py build
setup.py install
But when i call my function it says "SyntaxError: ivalid syntax" is there something that i have missed with the build and install process, or the error is somewhere in my function/code/dot.py ?
Is there any possible way to debug just dot.py ?

from bluedot.

martinohanlon avatar martinohanlon commented on June 28, 2024

If you are receiving syntax error it will be because you have an error in your code.

You can use setup.py develop to install a development code of a python library.

from bluedot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.