wirecraft

Games · Arduino Uno

Lightning Reflex Tower

A Arduino Uno build with 5 components. Reads: Button. Drives: LED, LED, LED, Buzzer.

3 parts · 10 connections · 10 steps

Wiring

Mini Map
power
ground
data
signal
analog

Parts

PartRefsQtyEst.
LED (5 mm) + 220 Ω resistorLED, LED_2, LED_33$0.45
Tactile push buttonButton1$0.10
Passive piezo buzzerBuzzer1$0.60
Plus: breadboard, jumper wires, USB cable≈ $1.15

Prices are rough hobby-market estimates. Click a part for wiring notes and specs.

Firmware

src/main.cpp
1// Reaction Game
2// Generated by Wirecraft for the Arduino Uno (ATmega328P)
3// Prompt: A reaction game with three LEDs, a button and a buzzer that scores how fast you react
4//
5// Wiring, parts and step-by-step assembly live alongside this file.
6
7#include <Arduino.h>
8
9#define LED_PIN 2
10#define LED_2_PIN 3
11#define LED_3_PIN 4
12#define BUTTON_PIN 5
13#define BUZZER_PIN 6
14
15bool buttonPressed = false;
16
17void setup() {
18 Serial.begin(115200);
19 pinMode(LED_PIN, OUTPUT);
20 pinMode(LED_2_PIN, OUTPUT);
21 pinMode(LED_3_PIN, OUTPUT);
22 pinMode(BUTTON_PIN, INPUT_PULLUP);
23 pinMode(BUZZER_PIN, OUTPUT);
24 Serial.println(F("Reaction Game ready."));
25}
26
27void loop() {
28 // --- Read sensors ---
29 buttonPressed = (digitalRead(BUTTON_PIN) == LOW);
30
31 delay(50);
32}
33
platformio.ini
1; PlatformIO project for Reaction Game
2[env:uno]
3platform = atmelavr
4board = uno
5framework = arduino
6monitor_speed = 115200
7

Assembly

  1. 1

    Lay out your workbench

    Gather the Arduino Uno, a half-size breadboard, and a bundle of male-to-male jumper wires. Keep the parts list open — every component below gets its own spot on the breadboard. Don't plug in USB power until the last wire is placed.

  2. 2

    Seat the board and power rails

    Run a red jumper from the Arduino Uno's 3V3 (or 5V for 5 V parts) pin to the breadboard's + rail, and a black jumper from GND to the − rail. Every component's power and ground will tap these rails.

  3. 3

    Wire the LED

    Place the LED (5 mm) + 220 Ω resistor on the breadboard. Power first: CATHODE → − rail. Then signals: ANODE → D2. Tip: The longer leg is the anode (+). The resistor can go on either leg.

  4. 4

    Wire the LED #2

    Place the LED (5 mm) + 220 Ω resistor on the breadboard. Power first: CATHODE → − rail. Then signals: ANODE → D3. Tip: The longer leg is the anode (+). The resistor can go on either leg.

  5. 5

    Wire the LED #3

    Place the LED (5 mm) + 220 Ω resistor on the breadboard. Power first: CATHODE → − rail. Then signals: ANODE → D4. Tip: The longer leg is the anode (+). The resistor can go on either leg.

  6. 6

    Wire the Button

    Place the Tactile push button on the breadboard. Power first: GND → − rail. Then signals: SIG → D5. Tip: Legs on the same side are connected in pairs — wire diagonally opposite corners to be safe.

  7. 7

    Wire the Buzzer

    Place the Passive piezo buzzer on the breadboard. Power first: GND → − rail. Then signals: SIG → D6. Tip: Passive buzzers need tone(); active ones just want HIGH. This design assumes passive.

  8. 8

    Double-check before power

    Trace every wire against the diagram once more — 10 connections in total. The classic mistakes: swapped power and ground, and off-by-one rows on the breadboard. Thirty seconds of checking saves a component.

  9. 9

    Flash the firmware

    Open the exported folder in VS Code with the PlatformIO extension (free), plug in the Arduino Uno over USB, and hit Upload. PlatformIO fetches the libraries listed in platformio.ini automatically. Prefer the Arduino IDE? Copy src/main.cpp into a new sketch and install the same libraries from the Library Manager.

  10. 10

    Bring it to life

    Open the Serial Monitor at 115200 baud — you should see "Reaction Game ready." Then start customizing the loop; the sketch is organized so every component's code is easy to find.