Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•ΉοΈ Whack.io

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.

✨ Features

  • 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.

πŸ› οΈ Hardware Components

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)

πŸ’» Software Requirements

To run this code, you will need the following software and libraries:

  • Arduino IDE: Required to compile and upload the whack_io.ino file 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.

πŸ”Œ Pin Mapping / Wiring Guide

System Components

Component Arduino Mega Pin Notes
Control Button Pin 14 Uses INPUT_PULLUP
I2C LCD SDA / SCL Address 0x27

Player 1 (Left Side)

Component Arduino Mega Pins Notes
LEDs (Target) 22, 23, 24, 25, 26 OUTPUT
Arcade Buttons 30, 31, 32, 33, 34 Uses INPUT_PULLUP

Player 2 (Right Side)

Component Arduino Mega Pins Notes
LEDs (Target) 7, 8, 9, 10, 11 OUTPUT
Arcade Buttons 2, 3, 4, 5, 6 Uses INPUT_PULLUP

πŸš€ How to Play

  1. Power on the system. The LCD will display the start screen.
  2. Press the Control Button once to start the match.
  3. When your LED lights up, smack the corresponding arcade button as fast as you can.
  4. 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.
  5. The game ends automatically after 60 seconds.
  6. The LCD will display the final scores and crown the winner.
  7. Double-click the Control Button at any time to reset the game.

πŸ“œ Credits

About

Whack.io is a 2-player, Arduino Mega-powered competitive game inspired by "Whack-a-Mole". Players race to hit randomly illuminated arcade buttons during a 60-second round that features dynamic speed scaling, single-button game control, and real-time LCD score tracking. Developed for JPCS.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages