Remote Control

Here are two programs that you can load onto two Micro:Bits, one in a Cutebot, and one in a Joystick. Read the programs to figure out how they work.

Here is a table mapping each button or gesture to the numerical code that is sent via radio:

InputString Code SentInteger Code SentNotes
Button A“b”0radio.sendValue(“b”, 0)
Button B“b”1radio.sendValue(“b”, 1)
Joystick Button P12“b”2radio.sendValue(“b”, 2)
Joystick Button P13“b”3radio.sendValue(“b”, 3)
Joystick Button P15“b”4radio.sendValue(“b”, 4)
Joystick Button P14“b”5radio.sendValue(“b”, 5)
Buttons A+B together“b”6radio.sendValue(“b”, 6)
Shake gesture“b”7radio.sendValue(“b”, 7)
Joystick X axis“x”X value (0-1023)radio.sendValue(“x”, x)
Joystick Y axis“y”Y value (0-1023)radio.sendValue(“y”, y)