button = pressedread one of two states
Lesson / Robotics
The display says 347. That might mean bright, close, tilted, or nothing useful at all. Find out what the sensor measures, collect readings, and decide where the program should change its response.
Identify what the input reports and the units or states it uses.
Record several values under different known conditions.
Compare readings and test a threshold or timing rule.
Add waiting, a random start, button input, and an elapsed-time result.
Demonstrate the reading, the program's decision, and one source of variation.
button = pressedread one of two states
distance < 15compare a reading with a threshold
light levelinspect a value that changes
read repeatedlytake several samples over time
Guided project
Wait for an unpredictable signal, press as quickly as possible, and make the timer distrust suspiciously early presses.
A waiting state, Random start delay, Visible go signal, Button response.
Input, Timing, Variables, Randomness, State.
A working version with a tested change, one repaired problem, and a clear explanation.