Students use an if block to make the micro:bit decide, and see that a false if does nothing, so turning something off needs its own question.
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Predict and Run 8 min · Investigate 12 min · Modify 8 min · Mix it up 3 min · Make 10 min · Fridge alarm 4 min
An if block asks a yes-or-no question (a condition), such as light level < 50. When the answer is yes (true), it runs the blocks inside; when no (false), it skips them and does nothing. That second half surprises students: in the Predict, the lights come on in the dark and stay on, because nothing tells them to go off. The fix is a second if with the opposite question. The comparison block is in Logic: < less than, > greater than, ≥ greater than or equal to. Next lesson, else does the same job more neatly.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
The teacher reads a question ("if you are wearing blue"). Students for whom it is true stand up. Then the teacher reads a question that is false for everyone.
When the question is false, nobody does anything: nobody sits down unless a question tells them to.
An if does nothing when false, so turning something off needs its own question. Ask them to read the question aloud for a dark room and a bright one.
| What you will see | A question to ask | The fix |
|---|---|---|
| The lights never come on. | Read your question aloud: is it true when it is dark? | Check the < and >: a night light needs light level < 50. |
| The lights flicker when the slider is near 50. | Which questions are true at exactly 50? | Use < 50 for one and ≥ 50 for the other, so exactly one is true. |
| The if block will not snap in. | Is it inside forever, and is the comparison inside the if's slot? | Drag the comparison from Logic into the hexagon slot of the if. |
One possible solution for each task. Other correct programs are fine.

basic.forever(function () {
if (input.lightLevel() < 100) {
basic.showLeds(`
# # # # #
# # # # #
# # # # #
# # # # #
# # # # #
`)
}
if (input.lightLevel() >= 100) {
basic.clearScreen()
}
})

basic.forever(function () {
if (input.lightLevel() < 100) {
basic.showLeds(`
# # # # #
# # # # #
# # # # #
# # # # #
# # # # #
`)
}
if (input.lightLevel() >= 100) {
basic.clearScreen()
}
if (input.temperature() > 30) {
basic.showIcon(IconNames.Sad)
}
})

basic.forever(function () {
if (input.temperature() < 10) {
basic.showLeds(`
# . # . #
. # # # .
# # # # #
. # # # .
# . # . #
`)
}
if (input.temperature() > 30) {
basic.showLeds(`
# . # . #
. # # # .
# # . # #
. # # # .
# . # . #
`)
}
})
Open task: any program that does what the step asks.
Stretch: Make the night light dim gradually: one row lit when it is a bit dark, three rows darker, all five in the dark (three ifs).
Support: Give students the second if already in place with an empty question, and ask them to choose the comparison.
A night light uses only 'if light level < 50, show lights'. Why do the lights stay on in the morning?
When it is bright the question is false, so the if does nothing. Nothing in the program turns the lights off.
Next lesson: else, which turns two ifs into one block with no gap. Class ideas: a classroom 'too noisy' light with the sound level (micro:bit V2); a plant monitor on a windowsill with a real micro:bit.