Source: https://mokxi.com/teachers/plans/build-race-timer
Updated: 2026-11-19

Lesson plan

# Build a race timer lesson plan

Light gates, a start tree and an LCD: time two lanes to the millisecond, catch false starts and run a pinewood derby.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Read four light gates and run a drag strip countdown.
- Time each lane to the millisecond and put the places on the screen.
- Red lights, time slips and a whole derby with lanes swapped for fairness.

### Materials for the whole unit

- Arcade button
- Arduino Uno R3
- Buzzer
- Character LCD, 20x4, with I2C backpack
- Photo interrupter, slot x 4
- Traffic light module

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 40 min

## Gates and the start

Read four light gates and run a drag strip countdown.

Lesson | Time | What students do

Light gates Read four slotted light gates, learn why blocked reads HIGH, catch a car crossing the line once, and turn its time in the beam into a speed. | 50 min

- Meet the track
- Blocked reads HIGH
- In and out
- A car crosses the line
- How fast was it?

Start signal Stage both cars in their start beams, run a drag strip countdown on a signal head with beeps, and time each lane's reaction from green. | 50 min

- Ready to stage
- Not staged
- Three yellows and a green
- Green means go
- Reaction time

### Materials

- Arcade button
- Arduino Uno R3
- Buzzer
- Character LCD, 20x4, with I2C backpack
- Photo interrupter, slot x 4
- Traffic light module

### Check for understanding

Each student finishes "Start signal" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Reaction time".

Chapter 2. About 1 h 30 min

## Time the race

Time each lane to the millisecond and put the places on the screen.

Lesson | Time | What students do

Lane times Time each lane to the millisecond with micros(), see why the loop must never wait, and call a DNF when a car does not arrive. | 40 min

- Time a lane
- Two lanes at once
- Did not finish
- Race over

Places on the display Turn two times into a result: first and second, the winning margin and a dead heat inside a millisecond, laid out cleanly on a 20x4 I2C LCD. | 50 min

- Is the screen there?
- Who won
- By how much
- On the LCD
- A photo finish

### Materials

- Arcade button
- Arduino Uno R3
- Buzzer
- Character LCD, 20x4, with I2C backpack
- Photo interrupter, slot x 4
- Traffic light module

### Check for understanding

Each student finishes "Places on the display" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A photo finish".

Chapter 3. About 1 h 50 min

## Race day

Red lights, time slips and a whole derby with lanes swapped for fairness.

Lesson | Time | What students do

False starts Catch a car that leaves before green with a red light, then print a real drag strip time slip: reaction, ET and total, and a win on a holeshot. | 50 min

- Jump the start
- The red lamp
- A time slip
- Win on a holeshot
- Slip on the screen

Project: a derby track Run a pinewood derby: four cars over four heats, every car in both lanes, false starts re-run, a champion on the LCD, then build the real track. | 60 min

- Race day
- Run a heat
- Swap lanes
- False start, run it again
- Crown a champion
- Build the real track

### Materials

- Arcade button
- Arduino Uno R3
- Buzzer
- Character LCD, 20x4, with I2C backpack
- Photo interrupter, slot x 4
- Traffic light module

### Check for understanding

Each student finishes "Project: a derby track" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Build the real track".

Your class

## Teach this unit as a class

Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
