Source: https://mokxi.com/teachers/plans/build-parking-assistant
Updated: 2026-11-19

Lesson plan

# Build a parking assistant lesson plan

A garage stop light from scratch: an ultrasonic sensor that measures with sound, LEDs that turn green, yellow and red, smoothing for messy echoes, sleep when the car is parked, and notes for mounting it for real.

3 chapters, 6 lessons, about 4 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

- Distance from a chirp and an echo, then a stick of LEDs that shows it as zones.
- Averaging, a hold for missed echoes, and a light that sleeps when the car is parked.
- Where to mount it, what the cold does to sound, and the finished garage stop light.

### Materials for the whole unit

- Addressable RGB LEDs
- Arduino Uno R3
- Buzzer
- Full-size breadboard
- LED
- Resistor
- Ultrasonic ranger

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 30 min

## Measure and show

Distance from a chirp and an echo, then a stick of LEDs that shows it as zones.

Lesson | Time | What students do

Measure distance with sound An ultrasonic sensor measures distance like a bat: a chirp, an echo, and a stopwatch. Move the wall, read the distance, and move the stop line. | 45 min

- Run it
- A chirp and an echo
- Faster beeps
- The stop line
- Move the stop line

Colors for zones Swap the buzzer for a light you can read through a windshield: a stick of eight LEDs that shows green, yellow and red as the car comes in. | 45 min

- Green: keep coming
- Count the LEDs
- Yellow: slow down
- Red: stop
- Fit your garage

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Buzzer
- Full-size breadboard
- LED
- Resistor
- Ultrasonic ranger

### Check for understanding

Each student finishes "Colors for zones" 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: "Fit your garage".

Chapter 2. About 1 h 10 min

## Steady and smart

Averaging, a hold for missed echoes, and a light that sleeps when the car is parked.

Lesson | Time | What students do

Smoothing Real echoes are messy: one bad reading and the light flickers. Average a few readings, ride out a missed echo, and find out what smoothing costs. | 35 min

- A flicker
- Average a few
- Smoothing costs time
- Ride out a missed echo

Sleep when empty A stop light that glows red all night wastes power and lights up the garage. Turn the LEDs off when the car has stopped, and back on when it moves. | 35 min

- Parked, and still red
- What it costs
- Go to sleep
- Wake up

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Ultrasonic ranger

### Check for understanding

Each student finishes "Sleep when empty" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 3. About 1 h 10 min

## Build it

Where to mount it, what the cold does to sound, and the finished garage stop light.

Lesson | Time | What students do

Mounting notes Where the sensor goes decides whether it works: bumper height, aimed level, away from shelves. Plus a cold garage, where sound is slower and every reading is off. | 35 min

- Bumper height
- A cold garage
- Tell it the temperature
- Plan your install

Project: a garage stop light Put it all together: a light that guides the car in, flashes if you go too far, ignores a bad echo, and goes to sleep once you have parked. | 35 min

- Drive in
- Too close: flash
- Your settings
- Morning

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Ultrasonic ranger

### Check for understanding

Each student finishes "Project: a garage stop light" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

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.
