← Teacher guide

Pictures in order

Students see that blocks in on start run once, from the top, so the order of the blocks is the order of the pictures, and the last one stays.

micro:bit Foundations · Show and react · about 35 minutes · Open the student lesson

Classroom resources

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.

Students will be able to

Timing

Predict and Run 8 min · Investigate 10 min · Modify 7 min · Make 7 min · Door sign 3 min

Before class

No micro:bits needed: the simulator (the micro:bit picture beside the blocks) runs every program. Blocks in on start run once, when the micro:bit switches on, one after another from the top. This lesson is only about that order; the next one adds forever. Try the Make yourself: your name in show string, then a show leds picture (click the squares to light them).

Running the lesson

  1. Predict: take a vote. 'Both hearts at once' is the common wrong answer. Ask: how many blocks does the micro:bit do at a time?
  2. Run: the small heart stays. Say it plainly: blocks run top to bottom, once, and the last picture stays on.
  3. Investigate: students change the order of Lily's sign in the editor; the check ticks when it is right.
  4. Modify: show leds is the first time students draw. Ask which picture stays on after they add it.
  5. Make: the name badge. Let students show each other.

In class

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 hard part (on purpose)

Seeing that the blocks run one at a time. Ask which block ran last, instead of telling them.

When students get stuck

What you will seeA question to askThe fix
Only the last picture seems to show.Press restart and watch the very start. What scrolls first?Every block runs, one after another. The last one stays, so it is easy to miss the others.
A show leds block shows nothing.Which squares did you light?Click squares in the grid to turn them on.
The blocks sit outside on start and are greyed out.Which block are they inside?Drag them inside on start until the block hugs them.

Answers to the checks

  1. Predict: What will you see on the micro:bit?
    The big heart shows, then the small heart, and the small heart stays. The blocks run once, top to bottom, and the last picture stays on.
  2. Lily's sign: Lily's sign has three blocks in on start: show string HI, show icon happy face, show icon tick. What do you see?
    HI scrolls, then the happy face, then the tick, which stays
    The micro:bit does one block at a time, from the top. Each picture replaces the one before, and the tick is last, so it stays.
  3. Ten seconds later: Ten seconds after the program starts, which picture is on the screen?
    The tick: the last block
    When the last block has run, the program is finished, and the last picture is still on the LEDs.

Solutions

One possible solution for each task. Other correct programs are fine.

Modify › Draw your own picture

The program as blocks
Show as code
basic.showString("HI")
basic.showIcon(IconNames.Happy)
basic.showLeds(`
    . . . . .
    . # . # .
    . . . . .
    # . . . #
    . # # # .
    `)

Modify › A number first

The program as blocks
Show as code
basic.showNumber(7)
basic.showString("HI")
basic.showIcon(IconNames.Happy)
basic.showLeds(`
    . . . . .
    . # . # .
    . . . . .
    # . . . #
    . # # # .
    `)

Make

The program as blocks
Show as code
basic.showString("ANA")
basic.showLeds(`
    . # . # .
    # # # # #
    # # # # #
    . # # # .
    . . # . .
    `)

Change a door sign

Open task: any program that does what the step asks.

Stretch and support

Stretch: Make a badge that shows three things in a row, ending with the picture that should stay on all day.

Support: Give students the show string block already in on start, and ask them only to add and draw the show leds picture.

Exit ticket

on start has: show icon heart, show icon sad face, show icon tick. What is on the screen at the end?

The tick. The blocks run once, top to bottom, and the last picture stays.

What each step is for

Where it leads

Next lesson: forever, so the pictures repeat instead of stopping on the last one. With real micro:bits, press Download and drag the file onto the micro:bit to run it for real.