This is an entry in the
First Time Author Contest 2018
This project was for 'Creative Electronics', a Beng Electronics Engineering 4th year module at the University of Malaga, School of Telecommunications (www.etsit.uma.es).
In this instructable we have created a personalized version of the Whack-a-mole game. To emulate the molehills we use arcade buttons connected to a homemade Leonardo Arduino. According to the pressed button Leonardo emulates a keyboard and send by serial port the correspondent key. This information is received in Processing, where the game is emulated. Our main objective is to create a friendly interactive stress releaser, where you can hit your friend, your boss or whoever you choose!
Step 1: Bill of Materials
-Artificial Synthetic Grass
-Wire for breadboard
-Perforated PC Board
-A toy hammer
-Welder + Soldier
A useful link to buy the buttons:
The bill is around 25 euros.
Step 2: Song
This work, whose author is Alejandro Serrano Rueda is under Creative Commons 4.0 license (licencia de Reconocimiento 4.0 Internacional de Creative Commons).
Step 3: Make the Box Game
First, you have to do nine holes in the box in order to put the arcade buttons. Once you have done it, you can do another nine holes in a piece of artificial grass synthetic. Then, you can put the buttons in your box. You can also cover the box sides with brown cardboard. To close the box we have used a little piece of velcro.
Step 4: Arduino Code
To create the game, we have used the "Keyboard.h" library to emulate some keys. We use keys from '0' to '9' because we have nine buttons. We are going to need nine ports (from 2 to 10) configurated as inputs. It's necessary to use a debouncer (we have used a 200 ms delay).
Step 5: Circuit and Connections
For the buttons, we decided to use a pull-up configuration. There are LEDS inside the buttons, but we didn't use it for our project. Therefore for the connections, we followed the schematic indicated before (one for each of nine pins). We used a perforated board to put the resistances (as you can see in the picture). Finally we made a hole to to plug the Leonardo's wire into the PC. Arduino Leonardo is stuck on the box by using velcro.
Step 6: Processing
You can play some keyboard games only with the box, but we have also created a Processing-based game that simulate a field with molehills. People appear from these molehills and we must hit them to score points. The game has a main menu, where you can choose the person you want to hit and the degree of difficulty (it changes the speed of the heads).
We have a be nice policy.
Please be positive and constructive.