Lessons and the learning game

Build game show buzzers

Four lit arcade buzzers, a host with three buttons, a scoreboard and a buzzer: a real quiz night on an Uno, and the ideas that make it fair.

What you build

A set of game show buzzers for four players. The host reads a question, opens the buzzers, and the first player to press lights up and gets five seconds to answer. A right answer scores a point, a wrong one lets the others steal it, and the first to five wins a fanfare.

  • Four player buzzers: lit arcade buttons. Each is a microswitch and a 5 V lamp in one body, with the lamp's resistor already in the holder. Switches on pins 2 to 5, lamps on pins 6 to 9.
  • The host: three arcade buttons, READY, RIGHT and WRONG, on A0 to A2.
  • The scoreboard: a TM1637 four digit display on A3 and A4, one digit per player.
  • Sound: an active buzzer on pin 10.
  • The brain: an Arduino Uno.

Every switch is read with the pin's own pull-up, so there is no breadboard at all. Each button also answers a key while it runs (1 to 4 for the players, R, Y and N for the host), so several can be pressed at once.

How it works

Edges, not levels. The loop asks every button "are you down?" thousands of times a second. A press counts only at the moment a button goes from up to down, so holding one for a minute is still one press.

A fair snapshot. Each pass reads all four players into an array first and decides after. Checking player 1, acting, then checking player 2 would give player 1 a head start on every scan. Two presses inside the same scan, a few microseconds apart, are called a tie.

A state machine. The game is always in exactly one state: CLOSED while the host reads, OPEN once READY is pressed, ANSWER while a player answers, and GAMEOVER once someone reaches five. A press while CLOSED earns a 250 ms lockout, the same quarter second penalty the famous TV quiz uses.

Sound without stopping. An active buzzer has one note, so every sound is a rhythm of on and off times: {80, 60, 80} is a ding-ding for a right answer, {700} a long buzz for a wrong one. The sketch steps through each pattern with millis() instead of delay(), so no buzz-in is ever missed during a fanfare. The five second answer clock ticks the same way.

One source of truth. The scores live in one array, and the display is redrawn from it every time it changes.

The course

Build game show buzzers gets there in six lessons, all on the same wiring with a new sketch each time:

  1. Four buttons: pull-ups, pressed reads LOW, and counting each press once.
  2. Who pressed first: a fair snapshot, the winner's lamp, and how many milliseconds late everyone else was.
  3. Lockout: the host opens the buzzers, and early presses are locked out.
  4. Scores and host controls: RIGHT, WRONG, steals, and all four scores on the display.
  5. Sounds: rhythms from a one-note buzzer and a ticking answer clock.
  6. Project: a quiz night: the whole game, first to five, then make the rules your own.

Every step is checked against the running circuit, apart from the last, where you make the game yours and share it.