Skip to content
Buy 10+ on select items — save 10% auto-applied
Free US shipping on orders $35+
Order by 3pm ET — ships same-day from the US
Worldwide shipping via DHL
Skip to main content

Arduino Uno Passive Buzzer: Four-Player Lockout Quiz

September 13, 2026 17 views

Arduino Uno Passive Buzzer: Four-Player Lockout Quiz | ShillehTek
Project

Build an Arduino Uno quiz buzzer lockout with four player buttons, LEDs, and a passive buzzer so the first press wins and the host resets, using ShillehTek parts.

45 min Beginner6 parts

Project Overview

Arduino Quiz Buzzer System - Four Players, First Press Wins, Host Reset: Build an Arduino Uno quiz buzzer lockout system using tactile buttons, LEDs, and a passive piezo buzzer so the first press wins, everyone else is locked out, and the host can reset for the next question.

The heart of every game show is a lockout buzzer: the first contestant to hit their button lights up and locks everyone else out until the host resets. It is a deceptively good Arduino project: four inputs, four LEDs, a buzzer, and one boolean that decides who was first. This version gives each player their own tone, blinks the winner, and lets the host reset from a fifth button.

  • Time: ~45 minutes
  • Skill level: Beginner
  • What you will build: A four-player lockout buzzer with per-player LED and sound, host reset, and an optional wired remote button box.
Arduino Uno quiz buzzer lockout box with player buttons and LEDs showing the first-press winner
Whoever is first lights up - and nobody else can.

Parts List

From ShillehTek

External

  • Four colored LEDs (red, green, blue, yellow) and one white LED for the host
  • Two-core cable and small boxes if you want handheld buzzers on leads

Note: All buttons use the Arduino's internal pull-up resistors, so each is just a switch between a pin and GND - two wires per player, no resistors. That is what makes long cables to handheld buzzer boxes practical.

Step-by-Step Guide

Step 1 - Wire Buttons, LEDs, and Buzzer

Goal: Four stations and a host.

What to do: Player buttons: D2, D3, D4, D5 each to GND through a button. Player LEDs: D8, D9, D10, D11 -> 220Ω -> LED -> GND. Host reset button: D6 to GND. Host "ready" LED: D7 -> 220Ω -> LED -> GND. Buzzer -> D12.

Expected result: Every player has a button and a light; the host has a reset and a ready light.

Step 2 - The Lockout Idea

Goal: Fairness in one variable.

What to do: The sketch checks the four buttons in a tight loop (thousands of times per second). The first one seen pressed sets winner; while winner is set, the button checks are skipped entirely. That is the lockout - no timing tricks, just "don't look anymore." Reset clears winner.

Expected result: You can explain why two near-simultaneous presses can never both win.

Step 3 - The Sketch

Goal: Upload the code that detects the first press, locks out other inputs, and blinks the winner until reset.

What to do: Paste this sketch into the Arduino IDE and upload it to your Arduino Uno.

Code:

const int N = 4;
const int BTN[N] = {2, 3, 4, 5};
const int LED[N] = {8, 9, 10, 11};
const int TONE_HZ[N] = {523, 659, 784, 988};     // C, E, G, B: one note per player
const int HOST_BTN = 6, HOST_LED = 7, BUZZ = 12;

int winner = -1;                                  // -1 = nobody yet (armed)

void reset() {
  winner = -1;
  for (int i = 0; i < N; i++) digitalWrite(LED[i], LOW);
  digitalWrite(HOST_LED, HIGH);                   // ready light on
  tone(BUZZ, 300, 80);
  delay(300);                                     // ignore the reset button bounce
}

void setup() {
  for (int i = 0; i < N; i++) { pinMode(BTN[i], INPUT_PULLUP); pinMode(LED[i], OUTPUT); }
  pinMode(HOST_BTN, INPUT_PULLUP); pinMode(HOST_LED, OUTPUT); pinMode(BUZZ, OUTPUT);
  Serial.begin(9600);
  reset();
}

void loop() {
  if (winner < 0) {                               // armed: look for the first press
    for (int i = 0; i < N; i++) {
      if (digitalRead(BTN[i]) == LOW) {
        winner = i;                               // lockout: nobody else can win now
        digitalWrite(HOST_LED, LOW);
        digitalWrite(LED[i], HIGH);
        tone(BUZZ, TONE_HZ[i], 600);
        Serial.print("Player "); Serial.print(i + 1); Serial.println(" buzzed in!");
        break;
      }
    }
  } else {                                        // locked: blink the winner, wait for host
    digitalWrite(LED[winner], (millis() / 250) % 2);
  }

  if (digitalRead(HOST_BTN) == LOW) reset();
}

What to do: After uploading, have four people press their buttons at the same time.

Expected result: Exactly one LED blinks and one note plays; other presses do nothing until the host presses reset, which sounds a low click and relights the ready lamp.

Step 4 - Build the Buzzer Boxes

Goal: Real table-top buzzers.

What to do: Mount a big 16 mm button and the player's LED in a small box, and run a three-core cable (button, LED, GND) back to the Arduino. The original build used telephone wire and worked fine over several meters. Label the boxes with colors that match the LEDs.

Expected result: Four handheld buzzers on leads, ready for game night.

Step 5 - Game-Show Extras

Goal: Features hosts actually want.

What to do: Add a timeout that auto-resets after 10 seconds, an LCD showing who buzzed and their reaction time in milliseconds (record millis() when the question starts), a per-player score kept with a long-press on the host button, or an "early buzz" penalty mode where pressing before the host arms the system locks that player out for the question.

Expected result: A buzzer system with more features than the one on TV.

Conclusion

The quiz buzzer is a tiny lesson in state: armed or locked, and a variable that decides which. That same pattern, a guard flag that stops inputs from being processed, shows up in alarm systems, vending machines, and every interface where the first event must win. Plus, it is the best excuse to hold a trivia night.

Want the exact parts used in this build? Grab them from ShillehTek.com. If you want help customizing this project or building something for your product, check out our IoT consulting services.

Credits

All photos and images in this tutorial are credited to Mohamed Chaara on Hackster.io. The original guide by Mohamed Chaara served as the reference for this ShillehTek version. We thank him for his excellent work in the maker community.

Parts for this build

Everything used in this tutorial. Uncheck what you already have.

All 6 in stock
0 parts selected $0.00