The on start block sets the micro:bit's radio group.
A micro:bit can communicate with any other micro:bit with the same radio set group number.
In the example below it is set to 8.
The micro:bit sending out data is called the transmitter.
The micro:bit receiving the data is called the receiver.
Transmitter code Receiver code
Study the code above.
You will see that both micro:bits are set to radio group 8 so that they can communicate with each other.
The transmitter's radio send number block transmits data to the receiver micro:bit when a button is pressed.
If button A is pressed it will send 1.
If button B is pressed it will send 0.
The receiver's on radio received block sets a variable called 'number' to the data received.
If 'number' = 1 the receiver micro:bit will display a happy face.
If 'number' = 0 the receiver micro:bit will display a sad face.
Now look at the display on your micro:bit.
Your buggy has not had a run about for ages - It is probably feeling sad.
We are going to give your buggy a run - has that cheered it up?
But you don't know how to program your buggy - is it sad again?
You are going to learn how to program it! - that should cheer it up again.
Does your buggy really have emotions?
Interaction at a distance feels like magic.
Magic might be useful if you’re an elf, wizard or unicorn, but such things only exist in stories.
However, there is something much better than magic: science!