Whack-a-somebody

by Didry23 in Circuits > Electronics

1598 Views, 16 Favorites, 0 Comments

Whack-a-somebody

WhatsApp Image 2018-02-05 at 15.34.04.jpeg
WhatsApp Image 2018-02-05 at 13.58.03.jpeg
WhatsApp Image 2018-02-05 at 13.58.00(1).jpeg
Prueba del juego

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!

Bill of Materials

20180118_161931.jpg
20180118_161742.jpg
20180118_161911.jpg
20180118_162021.jpg
20180125_171028.jpg
20180118_161849.jpg

Materials used:

-Arcade buttons

-A box

-Artificial Synthetic Grass

-Arduino Leonardo

-9x1k Resistances

-Cardboard

-Wire for breadboard

-Perforated PC Board

-A toy hammer

-Cutter

-Welder + Soldier

-Velcro

-Liquid glue

A useful link to buy the buttons:

https://m.es.aliexpress.com/item/32820995279.html?...

The bill is around 25 euros.

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

Downloads

Make the Box Game

20180116_171715.jpg
20180116_171422.jpg
20180122_132440.jpg
WhatsApp Image 2018-02-05 at 13.58.00.jpeg

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.

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

Downloads

Circuit and Connections

arduino schematic.PNG
esquematico resisitencias botones.PNG
20180125_171028.jpg

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.

Processing

Adrimask.jpg
Bajo_cesped1.png
Bajo_cesped2.png
Alemask.jpg
Bajo_cesped3.png
Bajo_cesped4.png
Bajo_cesped5.png
Bajo_cesped6.png
Bajo_cesped7.png
Bajo_cesped8.png
Bajo_cesped9.png
Cesped.jpg
Fer.jpg
Fermask.jpg
mascara.png
Mask1.png
Mask2.png
Mask3.png
Mask4.png
Mask5.png
Mask6.png
Mask7.png
Mask8.png
Mask9.png
Ale.jpg
Topera.png
Adri.jpg

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