Watch the teacher demonstration: one micro:bit sends a message and another receives it with no cables.
| Question | Your answer |
|---|---|
| What did the first micro:bit do? | |
| What happened on the second micro:bit? | |
| Did they use cables? | |
| What was sent between them? |
🐞 There are 2 mistakes in the code below that stop it working. What are they, and how would you fix them?
Task 4: upgrade Rock–Paper–Scissors so two players can interact using radio. Plan the three steps.
| Step | Description |
|---|---|
| 1 | |
| 2 | |
| 3 |
| Feature | Your idea |
|---|---|
| What will your micro:bit send? | |
| What will it receive? | |
| How will it decide a winner? |
Before you build, think like a designer: lots of ideas, think about the player, refine the plan.
Task 1 — Ideation: what is the challenge? What makes it interesting?
| Idea | What is the challenge? What makes it interesting? |
|---|---|
| 1 | |
| 2 | |
| 3 | |
| 4 |
Stretch thinking — what vibe?
Task 3 — Design details
| Element | Your design |
|---|---|
| Game name | |
| Theme (funny, battle, race…) | |
| What happens in the game? | |
| Input (e.g. shake, button) | |
| Output (LED, sound, radio) | |
| Goal | |
| Fail condition |
⚖️ Balance & multiplayer design
| Question | Your response |
|---|---|
| What skill is needed to win? | |
| What makes it challenging? | |
| Is there randomness? | |
| How will you make it fair? |
Task 5 — Multiplayer design (radio extension)
| Between players | What happens? |
|---|---|
| Player 1 action | |
| Player 2 action | |
| What is sent (radio) | |
| How the winner is decided |
Your mission: create a new challenge inspired by Rock–Paper–Scissors.
| Idea | Description |
|---|---|
| 1 | |
| 2 | |
| 3 |
Challenge requirements
High-achievement extension
| Element | Your design |
|---|---|
| Game name | |
| Input | |
| Output | |
| Goal | |
| How you lose | |
| Random element? | |
| Multiplayer? (radio) |
Task 5: plan the logic of your code before you build it. (Use the micro:bit Editor tab to build it.)
If using radio:
Play other students' games, test them, and give useful feedback.
| Game | Fun (1–5) | Clear? | Easy / Hard? | Notes |
|---|---|---|---|---|
Radio battle mode (if used)
Finished building and tested your game? Climb as far up the ladder as you can. Pick any challenge, plan it in the box, then build it in the micro:bit Editor tab. More stars = harder.
let myChoice = 0 radio.setGroup(3) input.onGesture(Gesture.Shake, function () { myChoice = randint(0, 2) radio.sendNumber(myChoice) basic.showNumber(myChoice) })
Then in radio.onReceivedNumber: it's a draw if both numbers match. Otherwise you win if your choice beats theirs — rock(0) beats scissors(2), paper(1) beats rock(0), scissors(2) beats paper(1). (Neat trick for the win case: it's a win when (myChoice − theirChoice + 3) % 3 == 1.)
Nice work — when you're done, hit ⬇ Download my work and hand it in. — Mr Wong
Build, test in the simulator, then download the .hex to your micro:bit. Your code is saved inside the editor on this computer (separately from your workbook answers). If the editor doesn't load below, your school network may block it — use the “Open in a new tab” button.
Two micro:bits can talk if they are on the same group. One sends, the other receives the same kind of message (both strings, or both numbers).
radio.setGroup(1) input.onButtonPressed(Button.A, function () { radio.sendString("rock") })
radio.setGroup(1) radio.onReceivedString(function (receivedString) { basic.showString(receivedString) })
Both micro:bits must use the same group number. The sender uses sendString, so the receiver must use onReceivedString and show the variable (no quote marks) — that's exactly the two fixes from the Section 4 puzzle.
Need the original game to build on? In the micro:bit Editor tab, switch to JavaScript, select all, and paste this in. Switch back to Blocks to see it as blocks.
input.onGesture(Gesture.Shake, function () { let choice = randint(0, 2) if (choice == 0) { basic.showString("R") // Rock } else if (choice == 1) { basic.showString("P") // Paper } else { basic.showString("S") // Scissors } })