🎮 micro:bit Challenge Creator — Lesson 1

Year 7 · Digital Technologies — play, understand and improve the Rock–Paper–Scissors game · Mr Wong
This project: 1 · Play, Understand & Improve 2 · Radio, Design & Build →
Loading…
0%
🚀 This project (two lessons): play a micro:bit game, work out how it works, improve it — then next lesson learn how micro:bits talk by radio and design & build your own game. Today (Lesson 1): play, understand and improve Rock–Paper–Scissors.
Your answers save automatically in this browser as you type. Use Download my work to keep a copy and hand it in.

🏆 Success goals (the whole project)

  • I can use inputs like buttons and shaking
  • I can use outputs like LEDs and sound
  • I can explain how a program makes decisions
  • I can improve an existing program
  • I can explain how micro:bits use radio to communicate
  • I can design, test and improve my own game challenge

Goals 1–4 are this lesson; goals 5–6 are next lesson.

🎮 Section 1 — Play the game

Level 1: play the game, spot patterns, and think like a coder. Task 1: play Rock–Paper–Scissors on your micro:bit — shake it to play one round. (Need the program? See the Starter code & help tab.)

Key idea: INPUT → PROCESS → OUTPUT
QuestionYour answer
What do you do to start the game?
What appears on the screen?
Does it always show the same result?
Why do you think this happens?

Fill in the model:

  • I understand input → process → output

🛠 Section 2 — Understanding the code

Task 2: complete the logic below to show how Rock–Paper–Scissors works.

Program logic
When happens:
  Pick a random number between and
If number = → Show Rock
If number = → Show Paper
If number = → Show Scissors

✨ Section 3 — Improve the game

Task 3: improve your program. Choose an idea, explain your plan, predict what should happen, then test it.

Design loop: Choose → Plan → Predict → Test

Choose one or more:

  • Add a countdown
  • Add sound
  • Add animation
  • Add scoring
Design stepYour thinking
Step 1 — Choose: which feature will you add?
Step 2 — Plan: what will the player do? What will the micro:bit do?
Step 3 — Predict: what do you think will happen when you test it?
Step 4 — Test: what happened? What will you fix?
  • I chose a clear improvement
  • I explained what the player and micro:bit would do
  • I predicted what should happen
  • I tested my idea and improved it if needed
🎉 That's Lesson 1! You've played the game, worked out how it codes a decision, and improved it. Next lesson: how micro:bits talk by radio, then design and build your own game.
Go to Lesson 2 →
Your answers are saved on this computer and will be here next lesson. To be safe, also hit ⬇ Download my work. — 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.

💡 Rock–Paper–Scissors starter

In the micro:bit Editor tab, switch the editor to JavaScript (the { } JavaScript button at the top), select all, and paste this in. Switch back to Blocks to see it as blocks. Shake the micro:bit to play.

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: swap the letters for pictures with basic.showLeds or showIcon once it works.
Block version: on shake → set choice to pick random 0 to 2if choice = 0 show “R”, else if = 1 show “P”, else show “S”. That matches the logic in Section 2.

💾 How your work is saved

  • Autosave: everything you type saves in this browser automatically — you'll see “All work saved ✓” at the top.
  • Same computer, same browser: your answers come back when you return — including in Lesson 2 — but only on this device, and they can be lost if the browser data is cleared.
  • To be safe and to hand in: click ⬇ Download my work to save a file. Next lesson you can click ↥ Restore from file to load it back.
  • Print / PDF: use 🖨️ Print / PDF for a paper copy or to “Save as PDF”.