Design a reaction timer: an LED lights after a random wait, the player presses a button, and the game shows their time in milliseconds, fairly.
Who in the class has the fastest reactions? To find out fairly, the game has to stop people guessing when the light will come on.
Client: the class, for a lunchtime competition. Context: two players take turns.
Brief: after a random wait of 2 to 5 seconds an LED lights; the player presses a button; the game shows the reaction time in ms. Pressing before the light is a false start and must be caught. Kit parts only; USB power; it must explain itself on the serial monitor or an LCD.
Inquire: Read the brief: who it is for, what it must do (criteria) and the limits (constraints).
Develop: Plan before you build: parts, circuit, code and the tests you will run.
Create: Build it, first in the simulator, then for real if you have the kit. Expect a few tries; that is normal.
Test: Run your tests and record what happened, including what failed.
Evaluate: Judge it against each criterion, and say what you would change.
Make your prediction first. Help opens once you've locked it in.
InquireRead the brief: who it is for, what it must do (criteria) and the limits (constraints).
Inquire: the brief
Sort each line of the brief: a criterion (what it must do, which you can test) or a constraint (a limit you must work within)?
Waits a random 2 to 5 s before lighting
Shows the reaction time in ms
Catches a press before the light (false start)
Kit parts only
USB power
DevelopPlan before you build: parts, circuit, code and the tests you will run.
Develop: plan before you build
Put the game's loop() in order.
Pieces (click to add)
Your program
The LED lit at millis() = 41200 and the button was pressed at 41487. What is the reaction time in ms?
CreateBuild it, first in the simulator, then for real if you have the kit. Expect a few tries; that is normal.
Create: build it
TestRun your tests and record what happened, including what failed.
Test: run your table
EvaluateJudge it against each criterion, and say what you would change.
Evaluate: against the brief
For teachers
A Years 8–9 design project: a fair reaction timer with a random wait, a button and millis(), planned as an ordered loop with a false-start test, built in Tinkercad and optionally on hardware, tested and evaluated. About 150 minutes.
random(2000, 5001) and millis() are new: give them as a recipe card. A first version with delay() for the wait cannot catch false starts; that limitation is a good Evaluate point and a reason for the millis() version.
If you assess with MYP Design, the steps line up with the criteria:
A Inquiring and analysing: the brief, its criteria and constraints, and research into parts (Inquire).
B Developing ideas: a design specification, the circuit and code plan, and the test table written before building (Develop).
C Creating the solution: building it (in the simulator, then for real), following the plan and justifying changes (Create).
D Evaluating: testing against the specification, recording failures, improvements and impact (Test, Evaluate).
Otherwise, use the same four headings as a simple rubric: each step's reflect checks are the evidence list.
Running the lesson
Develop: ask how the game could know about a press during the wait.
Test: the class tries to cheat it.
The hard part (on purpose)
The false start is the hard part: it needs the button checked during the wait, not delay(). Let students meet the problem with delay() first.
When students get stuck
False starts are never caught. Ask: Is the button read while the game is waiting? Fix: Wait in a loop that checks millis() and the button, not one long delay().
Stretch and support
Stretch: Keep the best time of the session, and show a two-player result.
Support: A recipe card for random and millis, and the loop with the false-start check given.
Where it leads
Other Years 8–9 projects: Smart plant monitor, Parking assistant.
What each step is for
Inquire: the brief: Separating what the design must do (criteria) from the limits it works within (constraints) is the first move of any design brief.
Develop: plan before you build: Putting the game loop in order and tracing its timing plans the logic; the false-start check is the part most designs forget.
Create: build it: Building in the simulator first catches wiring and code slips cheaply; the real build then tests the design against the world.
Test: run your table: Running the test table written in Develop, and recording every result including failures, is the evidence for the evaluation.
Evaluate: against the brief: Judging the design criterion by criterion, with evidence from the tests, is what separates an evaluation from a description.