Back to School with STEM-Limited-Time Event(Aug 6-Sep 5)

user-img

Mirko Pavleski

+ Follow

DIY Simple Arduino Whack-a-Mole Game

Simple to make Arduino version of the Whack-a-Mole arcade game wich consist a few components.

DIY Simple  Arduino Whack-a-Mole Game
 
  • thumbnail-img
 

Hardware Components

  • Arduino Nano R3

    X 1
  • I2C 16x2 Arduino LCD Display Module

    X 1
  • Buzzer

    X 1
  • Illuminated Pushbutton Switch

    X 5
  • Resistor, 470 ohm

    X 5

Tools, APP Software Used etc.

  • soldering kit

  • Arduino IDE

    Arduino IDE

    Arduino

Story

 A "Whack-a-Mole" game is a classic arcade-style game where moles pop up randomly from holes, and the player uses a mallet or similar tool to "whack" the moles before they disappear.

 The goal is to hit the moles as they appear, to score points while avoiding hitting any other targets. It’s typically timed and the game ends after a certain period, with the player's score displayed. This time I will present you a simple way to make a Whack a mole portable game using an Arduino microcontroller. 

adetailed video instructions at:  https://youtu.be/p8iDL1kMmD8

In this case, the "moles" will be small buttons with built-in LEDs in different colors. A randomly selected button lights up for a certain time when we have to press it to get a point.

The device is very simple to make and consists of a few components:

 - Arduino Nano microcontroller module

  - 5 Buttons with built-in Leds with different colours

  - LCD display with 16x2 characters and I2C communication protocol

  - 5 resistors 470 Ohms

  - and Buzzer

The start of the game is indicated on the LCD display and then the buttons start to light up in random order. With each successful press of a button while it is lit, we get a point. If we press the wrong button, we get a negative point and the score is reduced by 1.

 Successful or unsuccessful activation of the button (actually catching the mole), as well as other states of the game are signaled by an appropriate sound generated by the buzzer. When the game starts, the first line shows the current score, while the second line shows a bar graph that gradually decreases over time and disappears after exactly thirty seconds, the same time the game lasts. This way we have a visual representation of the remaining time in the game. 

  To make the game more fun and addictive, over time the duration of the lighting of the corresponding button is reduced, in fact the game is accelerated. At the end of the game, all the buttons flash several times and this is accompanied by appropriate sounds. Then the final score appears on the screen. 

After a 5-second break, a new game starts.

I updated the code so that the player has a better overview of the game duration and now the bar instead of 16 horizontal, consists of 80 vertical bars.

 And finally, a quick conclusion. This is a really simple Arduino version of the Whack-a-Mole arcade game made with just a few components, but endlessly fun and addictive, great for testing and practicing reflexes. I installed the device in a suitable box made of PVC board with a thickness of 3 and 5mm and covered with self-adhesive colored wallpaper. Also, for compactness and mobility, the game is powered by 2 lithium batteries (7.4V).

 

Code
Schematic and Layout

DIY Simple Arduino Whack-a-Mole Game

Simple to make Arduino version of the Whack-a-Mole arcade game wich consist a few components.

11
 
1
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 1 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Country: Shipping Way:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection