Projects / Hand-raise light board

Hand-raise light board

Beginner1.3 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANO

    Wire the six desk buttons

    D2 to D7, each other leg to GND.

  2. NANO

    Wire the clear button

    D8 and GND.

  3. NANO18.5 mA

    Wire the six LEDs

    D9 to D13 and A0, each through 220 ohms to GND.

  4. NANO

    Wire the buzzer

    A1 and GND.

  5. NANO

    Upload the sketch

    All lights are off.

  6. NANO18.6 mA

    Press a desk button

    Its LED lights with one beep.

  7. NANO

    Press clear

    All the lights go out.

In short

How do you build a hand-raise light board?

Six buttons for six desks light six LEDs on a board at the front of the class, and a beep sounds for each new raised hand. The teacher clears the lights with a button. A friendly way to practise reading many inputs. You need Arduino Nano, Tactile push button 6 mm × 7, LED 5 mm red × 6, Resistor 220 Ω × 6, Passive buzzer, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 7 steps and about 80 minutes.

Level
Beginner
Time
About 80 min
Parts
7

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Desk buttons 1 to 6Nano D2 to D7 and GNDOne for each desk
Teacher clear buttonNano D8 and GNDClears every light
Desk LEDs 1 to 6 long legsNano D9, D10, D11, D12, D13 and A0, each through a 220 ohm resistorThe board lights
LED short legsNano GNDReturn
Passive buzzer + and -Nano A1 and GNDOne beep for each new hand

Code

Each desk has a button that lights its own LED on the teacher's board, and the buzzer gives one short beep the first time a desk presses. Pressing again while the light is already on does nothing, so a desk cannot keep making noise. The teacher presses the clear button to turn all the lights off. The sketch keeps an array of six true and false values, one for each desk, and counts how many are up, which it also prints on the serial monitor. A is used as a pin name for the analogue pin A0, which works as an ordinary digital output, and A1 drives the buzzer in the same way. Use six long wires for the desk buttons, or six separate small button boxes. Nano pins D0 and D1 are left free because they are used by the USB serial link. Try adding a second beep pattern when three or more hands are up, or showing the order the hands went up with the LED brightness. It is a classroom helper for fun and has no safety purpose.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

const uint8_t DESK_BTN[6] = {2, 3, 4, 5, 6, 7};
const uint8_t DESK_LED[6] = {9, 10, 11, 12, 13, A0};
const uint8_t CLEAR_BTN = 8;
const uint8_t BUZZ = A1;

bool raised[6];
bool prevDown[6];
bool prevClear = false;

void setup() {
  for (uint8_t i = 0; i < 6; i++) {
    pinMode(DESK_BTN[i], INPUT_PULLUP);
    pinMode(DESK_LED[i], OUTPUT);
  }
  pinMode(CLEAR_BTN, INPUT_PULLUP);
  pinMode(BUZZ, OUTPUT);
  Serial.begin(9600);
}

uint8_t countRaised() {
  uint8_t n = 0;
  for (uint8_t i = 0; i < 6; i++) if (raised[i]) n++;
  return n;
}

void loop() {
  for (uint8_t i = 0; i < 6; i++) {
    bool down = (digitalRead(DESK_BTN[i]) == LOW);
    if (down && !prevDown[i] && !raised[i]) {      // a new raised hand
      raised[i] = true;
      digitalWrite(DESK_LED[i], HIGH);
      tone(BUZZ, 1800, 120);                       // one beep for each new hand
      Serial.print(F("Desk "));
      Serial.print(i + 1);
      Serial.print(F(" raised. Hands up: "));
      Serial.println(countRaised());
    }
    prevDown[i] = down;
  }

  bool c = (digitalRead(CLEAR_BTN) == LOW);
  if (c && !prevClear) {                           // the teacher clears the board
    for (uint8_t i = 0; i < 6; i++) { raised[i] = false; digitalWrite(DESK_LED[i], LOW); }
    Serial.println(F("Board cleared"));
  }
  prevClear = c;
  delay(15);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Desk buttonLED lights and one beep
Same desk againNo second beep
Several desksSeveral lights on
Clear buttonAll lights off
Serial monitorPrints the desk and the count

If it does not work

A desk does nothing

Check its button goes to its pin and to GND.

LED stays dark

Check its direction and the 220 ohm resistor.

No beep

Check you have a passive buzzer on A1.

Lights stay on after clear

Check the clear button goes to D8.

Serial monitor shows nothing

Open it at 9600 baud.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the hand-raise light board?

Arduino Nano, Tactile push button 6 mm × 7, LED 5 mm red × 6, Resistor 220 Ω × 6, Passive buzzer, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the hand-raise light board take to build?

About 80 minutes for a beginner maker, in 7 steps.

How do I know the hand-raise light board works?

Desk button: LED lights and one beep. Same desk again: No second beep. Several desks: Several lights on.

A desk does nothing: what should I check?

Check its button goes to its pin and to GND.

LED stays dark: what should I check?

Check its direction and the 220 ohm resistor.

No beep: what should I check?

Check you have a passive buzzer on A1.

Lights stay on after clear: what should I check?

Check the clear button goes to D8.