Step 1: Make it
What is it?
Use micro:bit’s radio feature to answer questions in secret.
How it works
- Flash this program on to two micro:bits. You and a friend ask each other questions that have ‘yes’ or ‘no’ as the answer.
- Press input button A to send ‘yes’ and button B to send ‘no’ messages. A tick or cross will flash on both micro:bits’ LED display outputs for half a second.
- The program uses radio to send your answer secretly - no-one (except your partner) can hear the radio signal.
- When a radio message is received, the program uses selection to test the message: if the received message is equal to ‘yes’, then it shows a tick on the LED display, but if the message is equal to ‘no’ then it shows a cross.
- Make sure the radio group number is the same on both micro:bits – you can use any number between 0 and 255.
- If lots of you are using this program in the same place, you’ll want to make sure each pair of people has their own radio group number.
- Keep your radio group number a secret if you don't want anyone snooping on your messages!
What you need
- Two micro:bits (or MakeCode simulator)
- MakeCode or Python editor
- battery pack (optional)
- a friend and a secret to share!
Step 2: Code it
Step 3: Improve it
- Show different icons or messages for ‘yes’ and ‘no’.
- Use shake, tilt or buttons A and B together to send different answers such as ‘maybe.’
- Change ‘yes’ and ‘no’ to ‘dot’ and ‘dash’ and send Morse code messages.
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.