🎮 micro:bit Challenge Creator — Lesson 2

Year 7 · Digital Technologies — radio, then design & build your own game · Mr Wong
This project: ← 1 · Play, Understand & Improve 2 · Radio, Design & Build
Loading…
0%
👋 Welcome back — Lesson 2. First see how micro:bits talk to each other by radio, then design, build, test and share your own micro:bit game.
Your answers from Lesson 1 are saved on this computer. New to this machine? Use ↥ Restore from file to load the file you downloaded last lesson.  ← back to Lesson 1

📡 Section 4 — How micro:bits talk (radio demo)

Watch the teacher demonstration: one micro:bit sends a message and another receives it with no cables.

Key idea: SEND → (radio signal) → RECEIVE
QuestionYour 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?

Sending device
on start radio set group 1 on button A pressed radio send string "Boo" on button B pressed radio send string "Aaargh"
Receiving device
on start radio set group 1 on radio received receivedNumber show string "receivedNumber"
Mistake 1: the receiver listens with on radio received receivedNumber (the number block), but the sender sends text ("Boo"/"Aaargh"). Use the string receive block — on radio received receivedString — so it matches what was sent.
Mistake 2: show string "receivedNumber" has the variable name in quote marks, so it shows the literal words instead of the message. Remove the quotes and show the received variable itself, so the actual message appears.
  • I understand how micro:bits communicate

🤝 Section 5 — Add multiplayer (radio extension)

Task 4: upgrade Rock–Paper–Scissors so two players can interact using radio. Plan the three steps.

StepDescription
1
2
3
Winner helper: same choice = draw; different choices, decide who wins (e.g. rock beats scissors).
FeatureYour idea
What will your micro:bit send?
What will it receive?
How will it decide a winner?
  • My micro:bit sends data
  • My micro:bit receives data

🧠 Section 6 — Design Thinking Studio

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?

IdeaWhat is the challenge? What makes it interesting?
1
2
3
4

Stretch thinking — what vibe?

  • Funny
  • Competitive
  • Stressful
  • Skill-based
  • Random / lucky
  • Strategy

Task 3 — Design details

ElementYour 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

QuestionYour 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 playersWhat happens?
Player 1 action
Player 2 action
What is sent (radio)
How the winner is decided
  • I created multiple ideas
  • I chose the best idea and explained why
  • My game has clear rules, a goal and a fail condition
  • I planned the inputs and outputs
  • I considered difficulty and multiplayer (extension)

🎯 Section 7 — Design your challenge

Your mission: create a new challenge inspired by Rock–Paper–Scissors.

IdeaDescription
1
2
3

Challenge requirements

  • Use at least one input
  • Use at least one output
  • Include a goal
  • Include a fail condition
  • Be playable in under 1 minute

High-achievement extension

  • Use radio communication
  • Include two-player interaction
ElementYour design
Game name
Input
Output
Goal
How you lose
Random element?
Multiplayer? (radio)

💻 Section 8 — Build your program

Task 5: plan the logic of your code before you build it. (Use the micro:bit Editor tab to build it.)

Code planner
START:
When happens →
  Do
If
  Then
Else →
  

If using radio:

  • My program runs
  • My inputs work
  • My outputs display correctly
  • Radio works (if used)

📝 Section 9 — Write player instructions

🏁 Section 10 — Challenge Arcade

Play other students' games, test them, and give useful feedback.

GameFun (1–5)Clear?Easy / Hard?Notes

Radio battle mode (if used)

  • Did it connect successfully?
  • Did both players interact?
  • Was the result fair?

⭐ Extension — challenge ladder (for fast finishers)

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.

⭐ have a go  ·  ⭐⭐ stretch  ·  ⭐⭐⭐ boss level
⭐⭐ Auto-judge over radio — both players send a number for their choice (0 = rock, 1 = paper, 2 = scissors). When you receive your opponent's number, use if / else to show Win, Lose or Draw. Write the rule that decides the winner:
Hint — the sending half
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.)

  • I attempted at least one ⭐⭐ challenge
  • I built and tested it on the micro:bit (or simulator)
  • I reached a ⭐⭐⭐ boss level

💭 Section 11 — Reflection

  • Use input and output
  • Modify a program
  • Create a working challenge
  • Write clear instructions
  • Use radio (extension)

Nice work — when you're done, hit ⬇ Download my work and hand it in. — Mr Wong

🧩 micro:bit MakeCode editor ↗ Open in a new tab

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.

📡 Radio reference (for Sections 4 & 5)

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).

SENDER
radio.setGroup(1)
input.onButtonPressed(Button.A, function () {
    radio.sendString("rock")
})
RECEIVER (correct)
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.

💡 Rock–Paper–Scissors starter

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
    }
})
Tip: combine this with the radio blocks above for a two-player version.

💾 How your work is saved

  • Autosave: everything you type saves in this browser automatically — including your Lesson 1 answers.
  • Same computer, same browser: your answers come back when you return — but only on this device, and they can be lost if the browser data is cleared.
  • Switched computers? Click ↥ Restore from file and choose the file you downloaded last lesson.
  • To hand in: click ⬇ Download my work (it includes both lessons) or use 🖨️ Print / PDF.