The lesson

🧑‍🏫 Teacher Guide

Use the line map from the kit or draw one with thick black tape. The correction is gentle on purpose: 50 and 25, not 50 and 0. Hard corrections overshoot and the car snakes. Fix It answer: both corrections steer the same way, so the car can rejoin the line from one side only and spirals off the other. Source: ElecFreaks wiki, Case 08 "Run Along the Black Line".

🟢 Time one lap. Change the straight-ahead speed to make it faster without losing the line.
Time a lap at the speeds you have → Raise both straight-ahead numbers together → Run it again and time it → Stop when it starts missing bends
🟡 The wiki asks this one: make it run on the white background and stay off the black line.
Write down what each probe sees on white → Work out which branch that is → Swap the answers around → Test it on the same map
🔴 What should it do at a crossroads? Decide, then build it.
Work out what both probes see where two lines cross → Find which branch already answers that → Ask whether the car can tell a crossroads from the middle of the line (both read ● ●) → Test it where two lines meet
cutebot_tracking

Checks both line sensors at the same time.

if (cuteBot.tracking(cuteBot.TrackingState.L_R_line)) {
    cuteBot.forward()
}

You see: True only for the pattern you picked, like left on the line and right off it.

logic_if_else

Picks one of two paths, one for true and one for false.

if (cuteBot.ultrasonic(cuteBot.SonarUnit.Centimeters) < 15) {
    cuteBot.stopcar()
} else {
    cuteBot.forward()
}

You see: Exactly one of the two groups runs, never both.

basic_forever

Everything inside runs again and again, without stopping.

basic.forever(function () {
    basic.showIcon(IconNames.Heart)
    basic.pause(500)
    basic.clearScreen()
    basic.pause(500)
})

You see: A heart that blinks on and off, about once a second, and never stops.

⚠ A forever with no pause repeats very fast. That is fine for motors (a speed ramp needs it), but a blink needs a pause to be seen.

cutebot_motors

Sets how fast each wheel turns, left and right, from -100 to 100.

cuteBot.motors(50, 25)
basic.pause(2000)
cuteBot.stopcar()

You see: The car drives in a wide curve to the right, because the left wheel is faster than the right one.

⚠ This is the most important block of the whole course. Every turn the car ever makes is two different numbers. Equal numbers go straight; a bigger left number curves right; one wheel forward and one backward spins the car on the spot; both negative backs up.

basic_show_icon

Puts one of the built-in pictures on the 25 lights.

basic.showIcon(IconNames.Happy)

You see: A smiling face made of lit dots. It holds for about 0.6 seconds, then stays on screen until something else is shown.

⚠ This block waits — about 0.6 s (interval, default 600 ms) before the program moves on. Two icon blocks in a row are both visible; the second one then stays. To clear the screen you need clear screen.

Answer key

Conceptc1 → C, c2 → C
Readingr1 → A, r2 → B, r3 → B
Debugd1 → A, d2 → C
Buildingb1 → A, b2 → B

Talk rubric

Strong — says the combinations are branches inside a single loop that is re-read constantly, so one program covers all of them and can switch between them as the car moves. Developing — says one program works but does not mention the loop re-reading the probes. Needs Focus — agrees that four programs are needed, or says only one combination matters.

A week later

These questions are not on the check-up page. They come back in the next chapter's Warm-up, five days or more after the check-up — with one new program on the same idea each.

Concept 2 🗓️ Comes back a week laterThe left probe is off the line and the right one is on it. Where has the car drifted? → C It has drifted left of the line
· New code (same idea)The left probe is on the line and the right probe is off it. Where has the car drifted? → B It has drifted right of the line
Reading 2 🗓️ Comes back a week laterWhich way does the car steer when this branch runs? → D To the right
· New code (same idea)Which way does the car steer when this branch runs? → D To the left