cameronfr / RobotRemote

A simple Android UDP remote intended for basic robot control.
10 stars 7 forks source link

app screenshot

Google Play Link

App Description

Packets

An example packet: {'btn6':0, 'btn1':0, 'rightTouchPadX':-10, 'btn5':0, 'rightTouchPadY':-17, 'btn2':0, 'leftTouchPadY':-89, 'btn4':0, 'btn3':0, 'leftTouchPadX':-9}.

The touchpad values range from -100 to 100, while the button values range from 0 to 1. "btn1" is the top button and "btn6" is the bottom button.

In Python, the received message can simply be evaluated to a dict with ast.literal_eval(message.decode()). See the below for actual code.

Usage

See the Examples folder. ReceiverTesting.py is an example of how to receive the UDP packets. TelemetryTesting.py is an example of how to send telemetry back to the controller. Simply run cd Examples and python ReceiverTesting.py or python TelemetryTesting.py — there is a dialog that asks for ports and addresses.