6
Firstly, the micro:bit on the robot needs to be set to the same group as the remote control.
This part of the program looks for an incoming signal sent from another micro:bit. It is looking for a packet of data made up of a string and a number value which will temporarily be stored in variables called name and value.
If the string received is "acc" (remember we used this to represent the accelerometer value) then the numerical value is stored in a variable called speed. We'll use this later to tell our robot how fast to go.
If the string received is "A", we know this is the data from button A being pressed which will be either 0 or 1. This value is stored in a variable called A.
If the string received is "B", we know this is the data from button A being pressed which will be either 0 or 1. This value is stored in a variable called B.