Measurement
A number or state reported by the sensor.
Topic Guide
A sensor measures something in the physical world and gives the program a value to read.
A robot can measure distance, light, motion, temperature, touch, or sound. The readings vary, so students collect several before choosing the threshold that controls a response.
An automatic light receives a number from its sensor. The designer decides which readings count as dark enough, and the code compares every new reading with that threshold.
A number or state reported by the sensor.
The chosen value where the program changes its response.
Small fluctuations and errors in the readings.
Taking new readings as the signal changes over time.
Report one of two states: pressed or released.
Estimate how far away an obstacle is.
Return a changing value as a space becomes brighter or darker.
Report acceleration values that can indicate movement or orientation.
Program connections
Students write commands, wire simple circuits, read sensors, and trace physical cause and effect through the Sense–Decide–Act loop.
A possible later program for testing patterns, predictions, prompts, mistakes, and the limits of AI tools.
Small fluctuations make the output flicker on and off.
The chosen boundary does not fit the room or task.
The program assumes every device and room gives the same values.
The component supplies a reading; the student's code decides what to do with it.
Connect a button to a visible and audible alarm, then write clear rules for arming, triggering, and resetting it.
See how it worksBuild a reaction timer with a random delay, an early-press rule, and results in the correct units.
See how it worksDesign a repeating patrol that notices an obstacle, tries a response, and checks whether the response worked.
See how it works