We will explore the micro:bit radio function by throwing (shaking the micro:bit) a ghost from one micro:bit to another.
This is adapted from the Micro:bit Educational Foundations teleporting duck tutorial.
What You Will Learn
How to:
Set the radio group for the micro:bits to communicate over.
Clear the LED matrix.
Send messages to the micro:bit.
Display an icon when the micro:bit receives a message.
What You Will Need
2 x micro:bits.
2 x micro-USB Cables.
2 x Battery packs for the micro:bits (optional).
Coding
Open your favourite browser (we recommend Google Chrome) and type python.microbit.org and press Enter . This will load the Python coding editor.
Click on line 3 and type the following code pressing Enter at the end of every line.
Delete the text on lines 8, 9, 10 .
Click on line 8 making sure your cursor is tabbed in not at the start of the line and type the following code again pressing Enter at the end of every line.
Completed Code
Now that we have completed the code we need to download it to the micro:bit.
Downloading the Code
Take the micro USB cable and connect the micro:bit to the computer.
Click on Connect . Click on your micro:bit and click connect .
3. Click on Download .
Now that we have downloaded our code to the micro:bits attach a battery pack and start throwing the ghost back and forth between you and your friend.
Try moving further away from one and other and see how far apart you can get before you can no longer catch the ghost.