Session 5 — Conditionals and Line Algorithms

Opening concept: If-then logic lets a robot make decisions, not just follow a script.

Activity:

  • EdScratch track: Unit 4 (What If…?) — conditionals, if statements, line-tracking algorithm
  • EdBlocks track: Activity 13–14 revisited — design a program that stops at a specific line, flashes lights, then continues
  • Shared challenge: program a traffic light intersection — Edison stops at red tape, goes on green (clap = green light)

Engineering connection: Event-driven programming. The robot waits for a condition, then responds.

Materials: Devices, USB cables, EdScratch Unit 4 sheets, red and green tape, barcode list