Source: https://mokxi.com/teachers/plans/build-carnival-games
Updated: 2026-11-19

Lesson plan

# Build carnival games lesson plan

Touch targets, light gates and an eight-digit display: whack-a-target, ring toss, skee-ball, high scores and a booth that pays out tickets.

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

- Touch targets and light gates: whack-a-target and a fair ring toss.
- Skee-ball lanes, a scoreboard and a high score that survives the night.
- Tickets, a jackpot, a game clock and attract mode: a booth that runs itself.

### Materials for the whole unit

- Arduino Uno R3
- Buzzer
- Eight-digit display, MAX7219
- Photo interrupter, slot x 3
- Touch sensor, TTP223 x 3

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

## Targets and sensors

Touch targets and light gates: whack-a-target and a fair ring toss.

Lesson | Time | What students do

Whack targets Read three touch targets, learn how a touch sensor feels a finger, and build a whack-a-target round with hits, misses and a time limit. | 60 min

- Step right up
- A touch reads HIGH
- Pop!
- Whack it
- Too slow
- A whole round

Ring toss sensors Put a light gate at the foot of each peg, count a ring only when the beam stays cut, catch the ones that bounce off, and score a turn. | 50 min

- Three pegs
- Blocked reads HIGH
- A ringer
- Bounced off
- A turn

### Materials

- Arduino Uno R3
- Buzzer
- Eight-digit display, MAX7219
- Photo interrupter, slot x 3
- Touch sensor, TTP223 x 3

### Check for understanding

Each student finishes "Ring toss sensors" 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 turn".

Chapter 2. About 1 h 30 min

## Lanes and scores

Skee-ball lanes, a scoreboard and a high score that survives the night.

Lesson | Time | What students do

Skee-ball lanes A light gate under each hole worth 10, 30 and 50: catch every fast ball on its edge, show balls and score on a MAX7219, nine balls a game. | 50 min

- Nine balls
- Into the 50
- Read the display
- A fast ball
- Game over

Scores Keep a high score that survives the power going off: EEPROM read at power-up, written only when beaten, and shown as H1 on the display. | 40 min

- No high score yet
- Play a game
- A new high score
- Try to beat it

### Materials

- Arduino Uno R3
- Buzzer
- Eight-digit display, MAX7219
- Photo interrupter, slot x 3
- Touch sensor, TTP223 x 3

### Check for understanding

Each student finishes "Scores" 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: "Try to beat it".

Chapter 3. About 1 h 40 min

## Run the booth

Tickets, a jackpot, a game clock and attract mode: a booth that runs itself.

Lesson | Time | What students do

Tickets Turn a score into tickets with a table and a jackpot, then count them out one chirp at a time like a real ticket machine. | 50 min

- The booth opens
- Game on
- Score into tickets
- Jackpot
- Count them out

Project: a game booth Run the whole booth: attract mode, a 30 second clock, tickets and a high score in EEPROM, then make it your own and build it for real. | 50 min

- Open for business
- Beat the clock
- Top the board
- Back to attract
- Build your booth

### Materials

- Arduino Uno R3
- Buzzer
- Eight-digit display, MAX7219
- Photo interrupter, slot x 3
- Touch sensor, TTP223 x 3

### Check for understanding

Each student finishes "Project: a game booth" 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: "Build your booth".

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.
