Arduino Learning Studiorobotics pathway

R09-U1 · usually age 9 · Robot Explorers

Programs and Patterns

How do we avoid repeating instructions?

Pilot unit plan · 5 sessions · not yet classroom-validated

Build: Animated wearable badge

Block programs on a micro:bit: blocks run in order, a “forever” block and a “repeat” block run others again, and an event waits for a button. Each idea is tried in MakeCode's simulator first, then on the real board, and the unit ends with an animated badge the learner changes on purpose and explains.

  • Decide

Who it is for

Age is a starting point, never a limit. A learner who can show what this unit starts from can begin here at any age.

How they learn
By arranging instruction cards or blocks, predicting what happens, and testing on a kit. Short sentences, with words and pictures together.
The adult's role
An adult oversees circuits, batteries and motors.
Session
60–75 minutes
Hardware
micro:bit with MakeCode, or a similar child-friendly board. Start in the board's own simulator. A micro:bit is 3.3 V: never connect a 5 V signal straight to it.

Starts from

Builds, and what it is the input for

In the studio today

Sessions

  1. Session 1 · 60 min

    In what order do blocks run?

    A block program is a sequence: blocks snapped together run from the top down. The “show leds” block draws a picture; the “forever” block keeps running the blocks inside it. The simulator only: nothing is plugged in.

    The adult says first: “Blocks are instructions. They run in order, top to bottom. Let's guess, then test.”

    Learner card

    1. Drag “show leds” into “forever”.
    2. Draw a big heart.
    3. Draw a small heart below it.
    4. Guess: which shows first?
    5. Watch the simulator.
    6. Change the order. Guess again.

    Key words (show each with a picture): block · order · forever

    Timing (27 of 60 min at the screen)

    1. 15 minAway from the screen: Picture-card acting: each learner holds one picture; the group stands in order and the adult reads the line from the top, then back to the start. Guess, then swap two cards and read it again.
    2. 15 minAt the screen: MakeCode: the Flashing Heart steps, two “show leds” pictures in “forever”. Guess which shows first, then watch the simulator.
    3. 10 minAway from the screen: On a 5 × 5 paper grid: draw a third picture and plan a new order, with a guess.
    4. 12 minAt the screen: Build the third picture, change the order, guess, then run it.
    5. 8 minAway from the screen: Fill in the table; say which block runs first and what “forever” does.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    Nothing is powered: this session uses the simulator only. First, away from the screen, the group acts a program out with picture cards: each learner holds one picture, they stand in order, and the adult reads the line from the top, then goes back to the start, as “forever” does. Then the adult opens MakeCode and the Flashing Heart tutorial and reads each step aloud. The learner drags a “show leds” block into the “forever” block and clicks squares to draw a big heart, then a second “show leds” block below it with a small heart. Before the simulator runs it, the learner says which picture shows first. Then the learner draws a third picture on a paper grid, builds it, changes the order of the three blocks, and predicts again before each run.

    Starting blocks: MakeCode tutorial “Flashing Heart” (makecode.microbit.org/projects/flashing-heart): a “show leds” block inside “forever”.

    Evidence to collect

    A prediction for each order, a short test table (Order of pictures | My guess | What showed) for three orders, filled in by the learner, and the learner's spoken explanation of which block runs first and what “forever” does.

    Test table columns: Order of pictures | My guess | What showed

    Predict
    Before each run, the learner points to the picture that will show first, then the one after it.
    Debug
    If the simulator shows nothing, check that each “show leds” block is snapped inside “forever”, not loose beside it.
    Reflect
    What would change if there were no “forever” block?

    Works towards: Block programs

  2. Session 2 · 60 min

    How can one block repeat other blocks?

    The “repeat” block runs the blocks inside it a set number of times, then the program goes on. In Robot Blocks, one step of a pattern is found and repeated, and a repeat goes inside a repeat. In MakeCode, a heart flashes a counted number of times.

    The adult says first: “A repeat does the same blocks again. Count with me.”

    Learner card

    1. Find one step.
    2. Put it in a repeat.
    3. Guess how many flashes.
    4. Run it. Count out loud.
    5. Change the number. Guess again.

    Key words (show each with a picture): repeat · times · pause

    Timing (30 of 60 min at the screen)

    1. 10 minAway from the screen: Body repeats: clap and step a pattern from picture cards, find the one step that repeats, and say how many times.
    2. 15 minAt the screen: Robot Blocks level 1, one step inside a repeat; level 2, a repeat inside a repeat.
    3. 10 minAway from the screen: On paper: draw the path each repeat made, and guess how many flashes a heart repeated 4 times gives.
    4. 15 minAt the screen: MakeCode: the “repeat” block with the heart in “on start”. Guess, run, count out loud, change the number.
    5. 10 minAway from the screen: Fill in the table; say what the number on “repeat” changes.

    In the studio

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    Nothing is powered. First the group claps and steps a pattern from picture cards and finds the one step that repeats. In Robot Blocks level 1, the learner finds one step of the stairs and puts it inside a repeat; in level 2, a repeat goes inside a repeat, and the learner points to the part of the path each one makes. Then in MakeCode's simulator: a “repeat” block (it reads “repeat 4 times”) inside “on start”, holding “show icon” (heart), “pause (ms)” 300, “clear screen” and “pause (ms)” 300. The learner predicts the number of flashes, runs it, counts out loud, then changes the number and predicts again.

    Starting blocks: Built from scratch: a “repeat” block from Loops inside “on start”, holding “show icon” (heart), “pause (ms)” 300, “clear screen” and “pause (ms)” 300, like MakeCode's repeat example.

    Evidence to collect

    A prediction for each number, a short test table (Repeat number | My guess (flashes) | Flashes counted) for three numbers, and the learner's spoken explanation of what the number on “repeat” changes.

    Test table columns: Repeat number | My guess (flashes) | Flashes counted

    Predict
    Before each run, the learner says how many flashes the number on “repeat” will give.
    Debug
    If the count seems off by one, slow it down (bigger “pause (ms)” numbers) and count again out loud with the adult.
    Reflect
    Where did a repeat save you blocks today, in Robot Blocks and in MakeCode?

    Works towards: Block programs

  3. Session 3 · 75 min

    How does a program wait for a button?

    Events: the “on button A pressed” block runs its blocks when button A is pushed and let go. First in the simulator (click its on-screen buttons), then on the real micro:bit, downloaded from MakeCode and then run from its battery pack.

    The adult says first: “Now the program waits for you. A button press is an event.”

    Learner card

    1. Drag “show icon” into “on button A pressed”.
    2. Pick a happy face.
    3. Do the same for B.
    4. Guess, then press.
    5. Hold A for three. What happens?

    Key words (show each with a picture): event · button · download

    Timing (25 of 75 min at the screen)

    1. 10 minAway from the screen: Act out an event: one learner waits and shows a happy-face card only when a partner taps their shoulder.
    2. 15 minAt the screen: MakeCode: the Smiley Buttons tutorial; guess, then click the simulator's A and B.
    3. 10 minAway from the screen: Write guesses for A, B and a long hold on A in the table.
    4. 10 minAt the screen: Plug in USB and download; wait until the light on the back stops flashing.
    5. 20 minAway from the screen: The real micro:bit: press A and B; then the battery pack (the adult fits it), and a long hold on A.
    6. 10 minAway from the screen: Fill in the table; say what an event is.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    First, away from the screen, the group acts out an event: one learner waits, and shows a happy-face card only when a partner taps their shoulder. In the simulator next: the learner follows the Smiley Buttons tutorial, so button A shows a happy face and button B a sad face, and clicks the simulator's buttons. Then the learner plugs the real micro:bit into the computer with its USB cable and downloads the program. The learner presses the real buttons. Next the learner unplugs USB and the adult plugs in the battery pack: the program is still there. Last, the learner presses and holds A for a slow count of three, then lets go, and says what happened.

    Starting blocks: MakeCode tutorial “Smiley Buttons” (makecode.microbit.org/projects/smiley-buttons): “show icon” inside “on button A pressed”.

    Evidence to collect

    A prediction for each button, a short test table (Button | My guess | What showed) for A, B and a long press on A, in the simulator and on the real micro:bit, and the learner's spoken explanation of what an event is.

    Test table columns: Button | My guess | What showed

    Predict
    Before pressing, the learner says what A, B and a long hold on A will show.
    Debug
    If a long press shows nothing, that is the block's rule: it runs when the button is pushed and let go within 1 second.
    Reflect
    What is different about a program that waits for you?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit or its gold pins along the bottom edge (no coins, keys, foil, metal clips or jewellery): metal across the pins can short the power. Hands holding the board are fine. The learner plugs in the USB cable, gripping the plug, while the adult watches; only the adult fits or unplugs the battery pack.

    Works towards: Block programs

  4. Session 4 · 75 min

    Can my badge play animations when I ask?

    The prototype, an animated wearable badge: “on start” shows a still picture; button A plays one animation and button B another, each a “repeat” holding “show leds” pictures with “pause (ms)” between them. Designed in the simulator, then downloaded and worn.

    The adult says first: “Today you design a badge. Loops make it move. Buttons choose what plays.”

    Learner card

    1. Make two animations.
    2. Put each in a repeat.
    3. Button A plays one.
    4. Button B plays the other.
    5. Test in the simulator first.

    Key words (show each with a picture): animation · repeat · event

    Timing (25 of 75 min at the screen)

    1. 10 minAway from the screen: Sketch two animations and a still picture on paper 5 × 5 grids.
    2. 15 minAt the screen: Build them in the simulator: each a “repeat” of “show leds” pictures with “pause (ms)”; try A and B.
    3. 10 minAway from the screen: Make the card badge: a plastic clip or a safety pin through the card only (the adult fits it).
    4. 10 minAt the screen: Plug in USB and download; wait until the light on the back stops flashing.
    5. 20 minAway from the screen: The adult fits the battery pack; tape the board to the badge, gold pins covered; wear it and test A and B.
    6. 10 minAway from the screen: Fill in the table; say which part repeats and which part waits.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    The learner sketches two animations on paper, then builds them in the simulator first: each a “repeat” of two or three “show leds” pictures with “pause (ms)” between them, on A and B, and a still picture in “on start”. The learner downloads it; the adult fits the battery pack and tapes its cover shut. The micro:bit and pack are taped to a card badge, held by a plastic clip or a safety pin through the card only, with tape over the gold pins.

    Starting blocks: The learner's own blocks from sessions 2 and 3: the “repeat” from session 2 and the “on button A pressed” event from session 3.

    Evidence to collect

    A prediction for each button, a short test table (Button | My guess | What it did) in the simulator and on the worn badge, and the learner's spoken explanation of which part repeats and which part waits for a button.

    Test table columns: Button | My guess | What it did

    Predict
    Before each press, the learner says which animation will play and how many times.
    Debug
    If a press seems to do nothing, check the letter on the event block (A or B) and that the animation sits inside it.
    Reflect
    Which part of your badge repeats, and which part waits for you?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit or its gold pins along the bottom edge (no coins, keys, foil, metal clips or jewellery): metal across the pins can short the power. Hands holding the board are fine. The learner plugs in the USB cable, gripping the plug, while the adult watches; only the adult fits or unplugs the battery pack. Badge: nothing metal touches the micro:bit or its pins. Hold the badge with a plastic clip, or a safety pin through the card only, well away from the board, and tape over the gold pins along the bottom edge. The badge is worn on the outside of clothing, never on a cord around the neck; the pack's cover is closed and taped.

    Works towards: Block programs

  5. Session 5 · 60 min

    Can I change my badge on purpose and explain it?

    Changing a block program on purpose: one change at a time to a loop (its number, or the “pause (ms)” inside it), predicted first, tried in the simulator, then on the real badge.

    The adult says first: “Change one thing. Guess first. Then test.”

    Learner card

    1. Pick one loop.
    2. Change one number.
    3. Guess what will change.
    4. Test in the simulator.
    5. Test on your badge.
    6. Tell why it changed.

    Key words (show each with a picture): change · loop · guess

    Timing (20 of 60 min at the screen)

    1. 10 minAway from the screen: Choose one change to a loop and write the guess.
    2. 10 minAt the screen: Try it in the simulator, then plug in USB and download it.
    3. 15 minAway from the screen: Test the real badge; fill in the table.
    4. 10 minAt the screen: A second change: the simulator, then download.
    5. 15 minAway from the screen: Test it, then show the badge to the adult and explain both changes.

    In the studio

    No studio lab or activity.

    Outside the studio: MakeCode editor and its micro:bit simulator (makecode.microbit.org)

    Hands-on

    The learner chooses one change to a loop in the badge, for example the number on “repeat” or a “pause (ms)” value, and says what will look different. They try it in the simulator first; then they plug the badge's micro:bit into USB, download it and unplug USB; the adult fits the battery pack if it is off, and the learner tests the real badge. They make a second change, predicted and tested the same way. Finally they show the badge to the adult and explain both changes.

    Starting blocks: The learner's own badge blocks from session 4.

    Evidence to collect

    The unit's evidence: the learner uses a loop in the badge program and explains a changed behaviour: a prediction for each of two changes to a loop, a short test table (My change | My guess | What changed), and the learner's spoken or written explanation of why the behaviour changed.

    Test table columns: My change | My guess | What changed

    Predict
    Before downloading a change, the learner says exactly what will look different.
    Debug
    If the change does not show on the badge, check that the new version was downloaded after the last change.
    Reflect
    Which change was easiest to predict, and why?

    ⚠ Adult checks before power-on: Nothing metal touches the micro:bit or its gold pins along the bottom edge (no coins, keys, foil, metal clips or jewellery): metal across the pins can short the power. Hands holding the board are fine. The learner plugs in the USB cable, gripping the plug, while the adult watches; only the adult fits or unplugs the battery pack.

    Works towards: Block programs

Materials

  • Per pair: a BBC micro:bit and its USB cable (USB micro-B at the micro:bit end)
  • A computer with a web browser for MakeCode (makecode.microbit.org); no installs needed
  • Kept by the adult: the micro:bit battery pack with 2 × AAA zinc or alkaline cells; no rechargeable cells, Li-ion, LiPo, RC or coin-cell packs
  • Pencils and paper for the test tables
  • Card, sticky tape and a plastic clip or a safety pin for the badge holder (the adult fits the pin, through the card only)

⚠ Safety before any session

  • Batteries: only the micro:bit's 2 × AAA pack with zinc or alkaline cells, or USB from a computer; no rechargeable cells, power banks, Li-ion, LiPo, RC packs or coin cells.
  • Cells: the adult fits two new cells of the same type, the right way round, never mixes new and used cells, and takes spent cells out of the pack.
  • The official pack has no on/off switch: to switch off, the adult unplugs it, gripping the connector's base and wiggling it gently, never forcing it.
  • Nothing is connected to the micro:bit's pins in this unit. Never connect a 5 V signal or supply to a micro:bit's pins or battery socket: it runs at 3.6 V at most.
  • Badge: nothing metal touches the micro:bit or its pins. Hold the badge with a plastic clip, or a safety pin through the card only, well away from the board, and tape over the gold pins along the bottom edge.
  • The badge is worn on the outside of clothing, never on a cord around the neck, and only during the session.
  • If the micro:bit or its pack gets warm: don't touch it; tell the adult, who unplugs it.

Notes for the adult

  • Read each step aloud first: your words come before the learner's card. The card uses short sentences; show each key word with a picture.
  • These plans assume one adult for up to four pairs. Learners plug the USB cable into their own computer, gripping the plug, while the adult watches; only the adult handles cells and battery packs. With more pairs, add an adult or bring fewer pairs to the real board at once.
  • Each session's timing keeps screen time to short bursts (15 minutes at most), with building, acting or testing away from the screen between them.
  • Before the first session on the real board, set up each computer and test a download: either pair each micro:bit once with WebUSB (then MakeCode's Download button sends the program straight to it), or download the .hex file and drag it onto the MICROBIT drive. The light on the back flashes while the program copies: unplug only after it stops.
  • The MakeCode simulator and Robot Blocks prepare the work. Only the real micro:bit, seen working by the adult, counts as evidence: a simulator run is never physical success.
  • Hand out each session's test table with its columns ready: the learner fills it in, and the adult writes only for a learner who needs it. Making their own tables is taught in R09-U3.
  • The studio's Arduino labs are written for ages 12 and up and are not used in this unit. Robot Blocks also shows each program as Arduino-style code: point to the blocks, not the code.
  • Readiness decides, not age: a learner who already builds and changes block programs with loops and events can move on to R09-U2.
  • The badge shows patterns and pictures, not the learner's name.

Planned studio features

Not built yet. The unit runs without them.

  • A micro:bit-style blocks simulator in the studio (today the unit uses MakeCode's own simulator and Robot Blocks).
  • Printable picture cards for each session's key words, and printable learner cards.
  • A printable test-table sheet for each session, with its columns.

Sources

The facts this plan relies on, in each source's own words.