Arduino Learning Studiorobotics pathway

R09-U3 · usually age 9 · Robot Explorers

Make Decisions

How do robots choose what to do?

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

Build: Dark-activated alert

Decisions from readings: a loop that checks again and again, “if then else”, and a threshold that turns a light reading into an alert. Robot Blocks first, then a dark-activated alert on the micro:bit, tested with predictions recorded in the learner's own test tables.

  • Sense
  • Decide
  • Test and debug

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

    How does a program keep checking?

    Repeat until: a loop that checks before every round and stops itself. If … else inside the loop: check once, then do one of two things. A test table records each guess and each result, so a failing case can be found.

    The adult says first: “Robots check again and again. Write a guess before every test.”

    Learner card

    1. Guess first. Write it.
    2. Run it. Write what happened.
    3. Try all three boards.
    4. Which part runs at a wall?

    Key words (show each with a picture): guess · test table · check

    Timing (27 of 60 min at the screen)

    1. 15 minAway from the screen: Floor robot: on a masking-tape grid, one learner is the robot and another reads the program cards; the robot checks for a wall before every step. Guess first.
    2. 15 minAt the screen: Robot Blocks level 3: one program, three boards; a guess before each run.
    3. 10 minAway from the screen: Copy the table onto paper and add a column of your own.
    4. 12 minAt the screen: Robot Blocks level 4: if … else inside the loop.
    5. 8 minAway from the screen: Say which part of if … else ran on each board.

    Hands-on

    Nothing is powered. First, away from the screen, the group plays robot on a grid of masking tape on the floor: one learner is the robot, another reads the program cards aloud, and the robot checks for a wall before every step. In Robot Blocks level 3, one program must reach the star on three boards. Before each run the learner writes a guess in a test table, then runs it and writes the result. Level 4 puts if … else inside the loop: the learner points to the part that runs at a wall and the part that runs when there is none. Then the learner copies the table onto paper and adds a column of their own (for example “Blocks used”).

    Evidence to collect

    A prediction for each board, the learner's own short test table (Board | My guess | What happened) with one extra column they chose, and the learner's spoken explanation of which part of if … else ran on each board.

    Test table columns: Board | My guess | What happened

    Predict
    Before each run, the learner writes whether the robot will reach the star on that board.
    Debug
    If a program works on one board but not another, run it step by step on the failing board and mark the row where it went wrong.
    Reflect
    How did the table help you find which board failed?

    Works towards: Trial tables

  2. Session 2 · 60 min

    When is close too close?

    A threshold: a reading compared with a number decides what the robot does. In Robot Blocks, distance counts the free squares ahead; “distance < N” is true when fewer than N squares are free. Trying 1, 2 and 3 shows how the number changes the robot's choice.

    The adult says first: “A threshold is a number that decides. Below it, do one thing. Not below, do another.”

    Learner card

    1. Try threshold 1.
    2. Guess where it stops.
    3. Write the result.
    4. Now try 2, then 3.
    5. Which works on every board?

    Key words (show each with a picture): threshold · distance · below

    Timing (27 of 60 min at the screen)

    1. 15 minAway from the screen: Floor robot: walk along a taped line towards a taped wall and stop when fewer than N squares are left; try 1, 2 and 3, guessing each time.
    2. 15 minAt the screen: Robot Blocks level 5: thresholds 1, 2 and 3, each guessed and recorded.
    3. 10 minAway from the screen: Compare the table: which threshold worked on all three boards?
    4. 12 minAt the screen: Robot Blocks level 6.
    5. 8 minAway from the screen: Say why one threshold works on every board.

    Hands-on

    Nothing is powered. First, away from the screen, the floor robot walks along a taped line towards a taped wall and stops when fewer than N squares are left, for N = 1, 2 and 3, with a guess each time. In Robot Blocks level 5, the robot has only a distance sensor. The learner tries thresholds 1, 2 and 3 in repeat until distance < N, guessing and recording each one in their test table. Level 6 uses the threshold in a new way: the learner finds out how. The adult adds: a real sensor's readings vary; here the squares are counted exactly.

    Evidence to collect

    A prediction for each threshold, the learner's short test table (Threshold | My guess | Where it stopped) for thresholds 1, 2 and 3, and the learner's spoken explanation of why one threshold works on all three boards.

    Test table columns: Threshold | My guess | Where it stopped

    Predict
    Before each threshold, the learner guesses on which square the robot will stop.
    Debug
    If the robot stops a square early or late, compare the threshold with the number of free squares at that spot.
    Reflect
    Why did one threshold work on all three boards?

    Works towards: Thresholds, Trial tables

  3. Session 3 · 75 min

    When is it dark enough?

    The same idea on the micro:bit: “forever” holds an “if then else” block whose condition is the “0 < 0” block with “light level” on the left and a number on the right. Below the threshold, “show icon” shows an alert; else, “clear screen”. At exactly the threshold, “<” is false.

    The adult says first: “Now the micro:bit decides. Dark means alert. You choose how dark.”

    Learner card

    1. If light is below 60, alert.
    2. Else, clear the screen.
    3. Guess for 30, 60 and 90.
    4. Test in the simulator.
    5. Then test the real one.

    Key words (show each with a picture): if then else · threshold · alert

    Timing (25 of 75 min at the screen)

    1. 10 minAway from the screen: Card sort: put 30, 60 and 90 on the alert or no-alert side of a line marked 60, with a reason.
    2. 15 minAt the screen: Build it in the simulator; the adult sets 30, 60 and 90 with the arrow keys.
    3. 10 minAway from the screen: Plan the two real tests (torch on; torch off with 3 sheets) and write guesses.
    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 tests, with the battery pack.
    6. 10 minAway from the screen: Fill in the table; say what happens at exactly 60.

    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 learner sorts cards for 30, 60 and 90 onto the alert or no-alert side of a line marked 60, with a reason. In the simulator next: the learner puts an “if then else” block inside “forever”. Its condition is the “0 < 0” block, with “light level” on the left and 60 on the right; “then” holds “show icon” with an alert picture the learner picks; “else” holds “clear screen”. To set the light level to 30, 60 and 90, the adult clicks the simulator's light circle, then presses the arrow keys (each press changes it by 1) and checks the number shown beside it; the learner records a guess and the result for each. Then the learner plugs the micro:bit into USB and downloads it, unplugs USB, and the adult fits the battery pack. The learner tests it on the table with the torch on, then with the torch off and 3 sheets of paper over the screen, peeking under one corner for the alert.

    Starting blocks: Built from scratch: “forever” holding “if then else” (from Logic), its condition a “0 < 0” block with “light level” on the left and 60 on the right.

    Evidence to collect

    A prediction for each light reading, the learner's short test table (Light reading | My guess (alert?) | What happened) for 30, 60 and 90 in the simulator and two cases on the real micro:bit (torch on; torch off, 3 sheets), and the learner's spoken explanation of what happens at exactly 60.

    Test table columns: Light reading | My guess (alert?) | What happened

    Predict
    Before each test, the learner says alert or no alert, and why, using the threshold.
    Debug
    If the alert never shows, check the comparison: “light level” on the left of “<”, the number on the right.
    Reflect
    What does the micro:bit do at exactly 60, 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. Light comes from a battery torch held by the adult, never a mains lamp near a child; never shine it into anyone's eyes.

    Works towards: Thresholds, Trial tables

  4. Session 4 · 75 min

    Which threshold works in this room?

    Choosing a threshold from measured readings: the room's light and the light under paper are measured first, with R09-U2's button-A light program, and the threshold goes between them. Near the threshold a passing shadow can switch the alert on and off; a different threshold changes which side a reading falls on.

    The adult says first: “Measure first. Then choose the number that decides.”

    Learner card

    1. Read the room's light.
    2. Press A through the paper.
    3. Lift it. Read the number.
    4. Pick a number between them.
    5. Guess, then test.
    6. Change it by 20. Test again.

    Key words (show each with a picture): measure · threshold · between

    Timing (25 of 75 min at the screen)

    1. 10 minAway from the screen: Guess the room's reading and the reading under 3 sheets.
    2. 10 minAt the screen: R09-U2's light program in the simulator, then plug in USB and download it.
    3. 15 minAway from the screen: Measure: room light, 1 sheet, 3 sheets. Press A through the paper, lift, read.
    4. 10 minAt the screen: Put the halfway threshold into the alert blocks; the simulator, then download.
    5. 15 minAway from the screen: Test room light, 3 sheets and a slow hand shadow.
    6. 5 minAt the screen: Change the threshold by 20 and download.
    7. 10 minAway from the screen: Test again; say how the measured readings set the threshold.

    In the studio

    No studio lab or activity.

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

    Hands-on

    In the simulator first, the learner opens R09-U2's button-A light program (“show number” with “light level” on A) and checks it, then downloads it to the real micro:bit; the adult fits the battery pack. The learner measures room light, 1 sheet and 3 sheets: press A through the paper, then lift it and read the sliding number. The learner chooses a threshold halfway between room light and 3 sheets, puts it into the session 3 alert blocks in the simulator, and downloads that version. The learner tests room light, 3 sheets and a hand's shadow held slowly over the screen, then changes the threshold by 20, downloads, predicts and tests again.

    Starting blocks: The learner's blocks from R09-U2 session 2 (“show number” with “light level” on A) to measure, then their session 3 alert blocks with the new threshold.

    Evidence to collect

    A prediction for each test, the learner's short test table (Light test | Reading | My guess (alert?) | What happened) for room light, 3 sheets and a shadow at two thresholds, and the learner's spoken or written explanation of how the measured readings set the threshold.

    Test table columns: Light test | Reading | My guess (alert?) | What happened

    Predict
    Before each test, the learner guesses whether the alert will show at the new threshold.
    Debug
    If the alert flickers under a shadow, the reading is crossing the threshold back and forth: measure the shadow with the button-A program.
    Reflect
    How did measuring first help you choose the number?

    ⚠ 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. Light comes from a battery torch held by the adult, never a mains lamp near a child; never shine it into anyone's eyes.

    Works towards: Thresholds, Trial tables

  5. Session 5 · 75 min

    Can I predict what my alert will do?

    The prototype, a dark-activated alert, tested like an engineer: three light values chosen on purpose (well below, exactly at, and well above the threshold), a prediction and a reason for each, then the test.

    The adult says first: “Engineers plan their tests. Pick three values on purpose.”

    Learner card

    1. One below. One at. One above.
    2. Guess each. Say why.
    3. Test in the simulator.
    4. Test on the real one.
    5. Were your guesses right?

    Key words (show each with a picture): plan · predict · result

    Timing (25 of 75 min at the screen)

    1. 10 minAway from the screen: Write the test plan: three values, a guess and a reason for each.
    2. 10 minAt the screen: Test all three in the simulator; the adult sets each value with the arrow keys.
    3. 5 minAway from the screen: Compare the simulator's results with the guesses.
    4. 10 minAt the screen: Plug in USB and download the button-A light program.
    5. 15 minAway from the screen: Find torch and paper settings that read near each value.
    6. 5 minAt the screen: Download the alert program.
    7. 20 minAway from the screen: Test the alert at each setting; explain each result.

    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 writes a test plan first: three light values, one well below the threshold, one exactly at it and one well above, each with a guess (alert or not) and a reason. They test all three in the simulator, where a value can be set exactly: the adult clicks the simulator's light circle, then presses the arrow keys (each press changes it by 1) and checks the number shown beside it. Then the learner downloads the button-A light program to the real micro:bit (the adult fits the battery pack) and finds torch and paper settings that read near each value, lifting the paper to read. Last, they download the alert program and test it at each setting. Finally the learner explains each result to the adult.

    Starting blocks: The learner's own alert blocks from session 4, and the button-A light program from session 4 to find the settings.

    Evidence to collect

    The unit's evidence: the learner predicts the response for three input values (below, at and above the threshold) before testing them: a short test table (Light value | My guess (alert?) | Why | What happened) tested in the simulator and on the real micro:bit, and the learner's spoken or written explanation of each result.

    Test table columns: Light value | My guess (alert?) | Why | What happened

    Predict
    Before each of the three tests, the learner writes alert or no alert, with a reason that names the threshold.
    Debug
    If a real result differs from the simulator, measure that setting again with the button-A program: it may not read the value you planned.
    Reflect
    Which of the three values taught you the most about thresholds, 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. Light comes from a battery torch held by the adult, never a mains lamp near a child; never shine it into anyone's eyes.

    Works towards: Thresholds, Trial tables

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
  • Plain white paper (three sheets per pair)
  • Kept by the adult: a battery torch (no mains lamp)

⚠ 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.
  • Light comes from a battery torch held by the adult, never a mains lamp near a child; never shine it into anyone's eyes.
  • 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.
  • Here the learner makes and fills their own test tables (columns given the first time): that is part of what this unit teaches.
  • 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.
  • Robot Blocks counts squares exactly; the micro:bit's light readings vary. Say so when the two disagree.
  • Readiness decides, not age: a learner who already chooses a threshold from measured readings and tests below, at and above it can move on.

Planned studio features

Not built yet. The unit runs without them.

  • A micro:bit-style blocks simulator in the studio, with a labelled simulated light input and a threshold line.
  • Printable picture cards for each session's key words, and printable learner cards.
  • A printable blank test table the learner fills in their own columns.

Sources

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