Closed csarnataro closed 6 months ago
Currently, Sketch supports the following BLE characteristics:
onPinActionCharacteristicWrite
is used to READ action and WRITE ( upon some specific action - read from analog and digital) a response for a specific PIN. The payload is of the form: [action, pin, pinValue]
. The action can be:
pinValue=0x4
then attach the servo to the pin, otherwise setup the pin using pinMode
pinValue
to the pin
pin
and write into the response.pin
and write into the response.pinValue
to the pin
pin
and write the PinValue to it.pin
and detach it.onRgbLedCharacteristicWrite
is used to READ an RGB value to switch on the led. Payload is: [redValue, greenValue, blueValue]
sensorsData
is a NOTIFY characteristic to send different values.versionCharacteristic
to WRITE the version of the sketch
Motivation
The wheels aren't moving in sync. This is because the
move forward
action is translated into two sequential messages (move right wheel + move left wheel).Changes
Move the logic of the robot in the sketch.
Notes