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.

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.

LessonTimeWhat students do
Whack targetsRead 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
  1. Step right up
  2. A touch reads HIGH
  3. Pop!
  4. Whack it
  5. Too slow
  6. A whole round
Ring toss sensorsPut 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
  1. Three pegs
  2. Blocked reads HIGH
  3. A ringer
  4. Bounced off
  5. 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.

LessonTimeWhat students do
Skee-ball lanesA 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
  1. Nine balls
  2. Into the 50
  3. Read the display
  4. A fast ball
  5. Game over
ScoresKeep 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
  1. No high score yet
  2. Play a game
  3. A new high score
  4. 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.

LessonTimeWhat students do
TicketsTurn 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
  1. The booth opens
  2. Game on
  3. Score into tickets
  4. Jackpot
  5. Count them out
Project: a game boothRun 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
  1. Open for business
  2. Beat the clock
  3. Top the board
  4. Back to attract
  5. 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.