1🔥 Warm-Up

In Scratch your code lived inside the computer and stayed there. Today your code leaves the computer: you send it to a small board with 25 lights, and it keeps running there on its own.

💻 Write it here⬇️ Send it over🔆 It runs there

Microwaves, washing machines and traffic lights all hold a tiny program inside them. Nobody keeps a laptop plugged into a traffic light.

2🤔 Predict

The program finishes. What is on the lights ten seconds later?

3🙌 Try It

  1. One face
    🎛 Change a value
    🎨 show icon
    AB
    🤔 The program ended. Why are the lights still on?

    Nothing turned them off. A picture stays until another block replaces it.

  2. Two faces, no wait
    🎛 Change a value
    🎨 show icon
    🤔 Watch closely. Do you see one face or two?

    Two — but the first one flashes past. Each face gets only a moment before the next one lands.

  3. Two faces, with a wait
    🎛 Change a value
    ⏱️ pause (ms)
    🎨 show icon
    🤔 What did pause change?

    It holds the happy face on screen. Same two blocks, but now you can read the story.

4🗺️ Plan

A face that looks at you, waits, then falls asleep. Here are the steps it takes.

Power on Wake up once — on start runs one time when the board powers on Show a face — the first icon appears and stays Hold it — two thousand milliseconds is two seconds Swap the face — a second icon replaces the first one

5🔨 Build

▶ Open MakeCodeKeep it open beside this page — you will build the blocks there, step by step.

  1. Put a show icon block inside on start.

    + add
  2. Add a pause of 2000 milliseconds.

    + add
  3. Add a second face below the pause.

    + add
  4. Run it and watch the face fall asleep.

Sleepy Face
Plug in the USB cable, press Download, and drag the file onto the MICROBIT drive. Unplug it, then plug in a battery pack — the faces play again, because your program stays saved on the board.
💡

If nothing happens, your block is probably sitting outside on start. Drag it until it clicks inside.

6🔧 Fix It

🐞 This face is awake for only a flash before it falls asleep.

Now — it goes wrong

2 pictures · 3.2s
Show the broken code

Goal — make it do this

2 pictures · 3.2s
🧱 all of these go inside on start
1
2
3
💡 See why it was broken
🐞 THE BUG — this code does this
✅ FIXED — it should do this

7🚀 Extend

  • 🟢 EasySwap both faces for a new pair.

    🎯 Make this happen
    2 pictures · 3.2s
    🪜 Your steps — tap when done

    🎉 All steps done!

    💡 Hint — the key block
  • 🟡 MediumMake the awake face last five seconds.

    🎯 Make this happen
    2 pictures · 6.2s
    🪜 Your steps — tap when done

    🎉 All steps done!

    💡 Hint — the key block
  • 🔴 HardAdd a third face in the middle, and say which one the story ends on.

    🎯 Make this happen
    3 pictures · 4.8s
    🪜 Your steps — tap when done

    🎉 All steps done!

    💡 Hint — the key blocks