Session 5 · 75 min
Can our rover follow a simple path?
The prototype, a line-sensing robot, follows a simple path: the training mat's start box, straight line, gentle curve and end. A run passes when the rover follows the line from the start box to the end of the line without help, and the lost-line stop then stops it by itself. Three runs, each predicted; every result counts.
The adult says first: “Show us your rover following the path. Every run counts.”
Learner card
- Read the pass rule.
- Guess each run.
- Press A when the adult says.
- Pass or fail? Write it.
- Explain the blocks.
Key words (show each with a picture): follow · path · pass
Timing (10 of 75 min at the screen)
- 10 minAway from the screen: Read the pass rule; a guess for each run.
- 10 minAt the screen: The final blocks in the simulator once, then download.
- 30 minAway from the screen: Turns, one pair at a time (about 6 minutes each, three runs): every result counts.
- 25 minAway from the screen: Explain the blocks: the threshold, the two sides, the counter, the time-out.
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 reads the pass rule and writes a guess for each of three runs. In the simulator next, the learner checks the final blocks once, then downloads them (the board switched off, the micro:bit out of the board, USB in; USB out once the light on the back stops flashing, the micro:bit back in). At each turn, the stop drill; with the rover on its stand the adult switches on and checks the sign (the No icon: the line program). The stand check: at the adult's word the learner presses A and steps back, and the adult slides the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait, or the rover stays on the stand and the adult switches off to check the middle sensor. With the program waiting for A, the adult carries the rover by its chassis from the stand to the start box and sets it down. Each pair's turn on the floor: three runs, each from the start box. At the adult's word the learner presses A and steps back outside the tape; only the adult presses B; the learner records pass or fail, and where the rover left the line if it did. Last, the learner explains the steering and the stops to the adult, pointing to the blocks: the threshold, the two sides, the counter and the time-out.
Starting blocks: The learner's own blocks from session 4.
Pins
- P0
- left line sensor
- P1
- middle line sensor
- P2
- right line sensor
Evidence to collect
The unit's evidence: the rover follows a simple path: a prediction for each run, a short test table (Run | My guess | Pass or fail) for three runs, and the learner's spoken or written explanation of how the threshold and the left and right control keep the rover on the line, and how it stops.
Test table columns: Run | My guess | Pass or fail
- Predict
- Before each run, the learner says pass or fail, and why.
- Debug
- If a run fails, it still counts: write where the rover left the line, and what the sensors may have seen there.
- Reflect
- What does your rover do when it is unsure where the line is, and why is that safe?
⚠ Adult checks before power-on: Nothing metal touches the micro:bit, its gold pins or the board, and nothing metal lies under it. Before the adult switches on: the micro:bit is firmly in the board, display facing the Link header, its own battery pack and USB unplugged; both switches were off while anything was plugged in or moved. The board's battery is the motor battery: it reaches the motors only through the holder's switch, the board's on/off switch (the power-off switch) and its Motor 1 and Motor 2 terminals. The power-off switch is the board's on/off switch: it cuts the battery to the board, the micro:bit and every motor and servo. Anyone may switch it off at any time; only the adult switches it on. The battery holder rides on the rover, tied down: only the adult opens it, fits cells or works its switch. Safe start: the motors never run just because the board was switched on. “on start” turns them off; only A starts them, after a 3-second wait, and B stops them: a B during the wait clears armed, which A checks after the wait, so the drive never starts. Lift first: the board is switched on only with the rover on its stand, wheels in the air, because a mistake in the blocks could start a wheel at once. On the stand, the board's switch faces the adult, who stands at it; learners stay outside a zone taped 30 cm round the stand. Buttons on a switched-on rover: a learner presses only A, only at the adult's word and only while every wheel is still, with one hand on the micro:bit, nowhere near a wheel, and is back outside the taped edge before the 3-second wait ends. B, the switch, and lifting, carrying or placing a switched-on rover are the adult's: on the floor only the adult presses B. Every program shows its own sign at start, and the adult checks it on the stand before the rover leaves it: the drive program (R11-U1) a Heart, the reading program a sensor number, the line program the No icon. A rover showing the wrong sign does not go on the floor. Fingers, hair, sleeves and cords stay away from the wheels while the board is on; long hair is tied back. The rover is lifted only by its chassis. Floor speed limit: the rover's speed numbers are never above 40 (of 100), a planning choice. Practise the stop before every switch-on: the adult is the stopper. On “Stop!”, the adult switches the board off (on the floor, lifting the rover by its chassis first); learners call “Stop!” from outside the taped zone and never reach for the rover. Rewire only when unpowered: the board and the holder are switched off before any wire, motor, servo or sensor is plugged in, moved or taken out. Never leave a lead loose while the board is on: switch off first; a lead taken out is capped and taped away from the board. The line sensor is a Kitronik Clippable Detector Board, rated 2 V to 5.5 V and powered only from the Link header's 3V pin, so its outputs come from 3.3 V; never from 5 V. Kitronik gives the detector's current as 54 mA at 3 V. At the header's 3.3 V it will draw a little more (about 60 mA if it rises in step with the voltage, an estimate), still under the header's 90 mA. The detector's leads, checked before every switch-on: its 3V lead goes to the Link header's 3V pin, never to a servo header's V pin. The board marks each servo header ‘GND V SIG’, and its V pin carries the battery's voltage (the datasheet: the servo outputs ‘Provide supply voltage to servos’), above the detector's 5.5 V and far above the micro:bit's 3.6 V. All five leads are tied down to the chassis and each one given a gentle tug. No music blocks in these units: MakeCode plays music through pin P0, where the left line sensor is. Before every floor turn, on the stand: A, then the white end of the test card under the sensors; the No icon must come back about 2 seconds after the 3-second wait. If it does not, the rover stays on the stand and the adult switches off to check the middle sensor and its wire. The lost-line stop: if the middle sensor sees no line for 20 passes of the loop in a row (each pass waits 100 ms, so about 2 seconds), the rover stops by itself. B stops the motors too. The run time-out: a second counter, passes, that A sets to 0 and every pass of the loop adds 1 to; at 300 passes (about 30 seconds, a little more in practice) the rover stops by itself wherever it is, even if a sensor has failed and reads dark all the time. 300 is a planning choice, sized to the plans' courses, where a good run at 30 takes under 20 seconds. Every course ends: the line stops at an end, with no loops, junctions or crossings, so a rover that keeps finding a line cannot circle for ever. The adult times a good run on each new course: if it takes 20 seconds or more, the course is made shorter. A switched-on rover that is not showing the No icon is live: it may be driving or about to drive. Hands off; the adult stays beside its switch. Stall or runaway: if a wheel is blocked, the rover pushes against anything, a motor hums without turning or the rover leaves the mat, call “Stop!” at once. Floor runs happen only in a cleared area with adults present: at least 1 m clear round the mat, learners outside its taped edge, one rover at a time per adult, who walks beside it.
Works towards: Reacting continuously