Whack.io is a fast-paced, 2-player competitive arcade reaction game powered by an Arduino Mega. Players race against the clock to smack their illuminated arcade buttons faster than their opponent. As the 60-second timer ticks down, the game gets progressively faster, testing your reflexes to the limit!
This project was built for our JPCS organization and is heavily inspired by the ButtonSmack game box by DIY Tech Bros.
- 2-Player Competitive Mode: Face off head-to-head.
- Dynamic Difficulty: The LED illumination window starts at 800ms and scales down to a blisteringly fast 200ms as the game progresses.
- Single-Button Game Control: A single control button handles game states (1 click to Start, 2 clicks to Reset).
- LCD Scoreboard: Real-time score tracking and winner announcement via an I2C LCD display.
To build the physical arcade box, you will need:
- 1x Arduino Mega 2560 (Required for the high I/O pin count)
- 10x Small Arcade Buttons (5 for Player 1, 5 for Player 2)
- 10x Super Bright LEDs (To illuminate the active targets)
- 1x I2C LiquidCrystal Display (20x4)
- 1x Standard Arcade Button (For the main Control/Reset button)
- 1x Breadboard & Jumper Wires
- 1x Power Supply (Power Bank)
- 1x Wooden Box (For the arcade enclosure)
To run this code, you will need the following software and libraries:
- Arduino IDE: Required to compile and upload the
whack_io.inofile to your Arduino Mega. - LiquidCrystal_I2C Library: Install this via the Arduino IDE Library Manager to control the LCD scoreboard.
- Wire Library: Included natively with the Arduino IDE for I2C communication.
| Component | Arduino Mega Pin | Notes |
|---|---|---|
| Control Button | Pin 14 | Uses INPUT_PULLUP |
| I2C LCD | SDA / SCL | Address 0x27 |
| Component | Arduino Mega Pins | Notes |
|---|---|---|
| LEDs (Target) | 22, 23, 24, 25, 26 | OUTPUT |
| Arcade Buttons | 30, 31, 32, 33, 34 | Uses INPUT_PULLUP |
| Component | Arduino Mega Pins | Notes |
|---|---|---|
| LEDs (Target) | 7, 8, 9, 10, 11 | OUTPUT |
| Arcade Buttons | 2, 3, 4, 5, 6 | Uses INPUT_PULLUP |
- Power on the system. The LCD will display the start screen.
- Press the Control Button once to start the match.
- When your LED lights up, smack the corresponding arcade button as fast as you can.
- If you hit it while lit, you score a point. The first player to hit their active button locks out the other until the next round.
- The game ends automatically after 60 seconds.
- The LCD will display the final scores and crown the winner.
- Double-click the Control Button at any time to reset the game.
- Inspiration: DIY Tech Bros - ButtonSmack
- Organization: Developed for JPCS.