Introduction: How to DIY a Whack-a-Mole Game With Cardboard Box

Recently I was bothered by a lot of cartons in the house. Don't want to just throw them away as recycles. But what magic can a big cardboard box make then? Try a Whack-a-Mole game! It’s a good way to kill time and quite simple to do. So just follow me to make your own game.

Step 1: Prepare Materials

Multi-Control Board - http://bit.ly/2sTJYxx

Mini USB cable

Some Dupont wires (male to female)

Some jumper wires (male)

9 arcade buttons (with LED)

Big cardboard box (big enough for 3 x 3 buttons with gap)

Soldering iron - http://bit.ly/2t3fPKx

Cutting plier - http://bit.ly/2trOEMe

Utility knife

Pencil

Ruler

Step 2: Cut Holes on the Cardboard Box

To mount the arcade buttons, we should cut 9 holes on the box. First, place the button shell on the proper position on the box, and trace the outline of the shell on the box with the pencil one by one, then cut out the holes with the knife along the lines.

Step 3: Mount and Name the Button Shells

Next, mount the button shells in the box, and mark them with numbers 1-9 (matched with key values set in the code).

Step 4: Connect the LED Cathode to Pin ON of Button

Two pins on each button are to connect an LED (attached with button). The LED is fixed in a white shell with a resistor connected to the anode. When you insert the LED in the button, the anode of LED connects to VCC, therefore the other serves as cathode, just connect it to the pin ON of the button (as marked on the button).

Step 5: Solder Buttons to Pins of VCC and GND Respectively

Connect the pins of VCC on buttons one by one, and connect the pins of COM in the same way by soldering, thus the buttons are connected in parallel. Then solder a male-to-female Dupont wire as the leading wire, so that it can connect to the pin header of Multi-Control.

Step 6: Extend the Pin ON of Button

Extend the Dupont wire by connecting another, then we use this as the leading wire for the pin ON of button. Repeat the operations for the rest buttons.

Step 7: Insert the Button Cores and Hitch to the Shells

After connecting wires, insert the core to the button in order. Note: Align them before inserting, and rotate the cores to fasten.

Step 8: Connect to the Multi-Control Board

Then connect the leading wires to the pins on the back of the Multi-Control board as follows:

Button--------------------Multi-Control Board

1------------------------------------Left

2----------------------------------DOWN

3-----------------------------------RIGHT

4--------------------------------------X

5--------------------------------------Y

6--------------------------------------A

7--------------------------------------B

8-----------------------------------START

9----------------------------------SELECT

VCC---------------------------5V(ICSP 5V)

COM--------------------------------GND

Connect the Multi-Control board to the computer with the Mini USB cable.

Step 9: Upload Code to Multi-Control Board

Go to Github page and download the code for Multi-Control, and unzip it. Then get into the folder: SunFounder_Multi_Control\multi-control-keyboard to run multi-control-keyboard.ino.

In the Arduino IDE, click keymap.h to modify the key values of the ten buttons. Here I define them according to the pin’s position on the board (designed previously and will be marked later).

Then select the board type (Leonardo) and port, and upload the code.

Step 10: Happy Time!!!

Open the Whack-a-Mole page. Now, let’s whack a mole!

Comments

author
DaisyX made it!(author)2017-07-03

Wow! So cool!

author
SunFounder+Maker made it!(author)2017-07-11

Thanks!

About This Instructable

1,368views

22favorites

License:

Bio: Here we are Instructables! Happy to bring you more fun projects and works. Welcome to visit our website www.sunfounder.com and leave your comments!
More by SunFounder Maker:How to Make a RetroPie Game BoxHow to Lock a Servo/Motor/RelayHow to Make a Pencil Drawing Piano
Add instructable to: