Android joystick application to control robots.
The app connects to your bluetooth device and opens a rfcomm connection to send serial data to your robot/device. After connecting to bluetooth device a REQUEST_CONNECT is send. The remote device should answer with a RESPONSE_CONNECTED. After that the app can send several commands depending on user input. The remote device has to react to these commands. These commands are supported:
- REQUEST_FORWARD 'F'
- REQUEST_BACKWARD 'B'
- REQUEST_LEFT 'L'
- REQUEST_RIGHT 'R'
- REQUEST_STOP 'S'
- REQUEST_CONNECT 'C'
- REQUEST_DISCONNECT 'D'
- REQUEST_SENSOR_UPDATE 'Q'
The device uses the following response on connect and disconnect:
- RESPONSE_CONNECTED "connected"
- RESPONSE_DISCONNECTED "disconnected"
The remote device can also send two sensor values using the folloing commands:
- Right sensor "rSens,value"
- Left sensor "lSens,value"
Replace value with a the value of the sensor (value > 0 sensor is active, value = 0 sensor is inactive)
Take care to send a line break '\n' after each response!
You can find a arduino example for sumo robot (https://github.com/robokoding/sumoino) inside example folder.