Update: This page was blogged on Hack-A-Day on Jan, 8. Since then I've received some comments and tips and modified the original sofrware. Now, after a game-over, the circuit enters on a demo mode, and keeps the waiting until someone hits "START" button. Better user interface!
These days I've found an old Dance-Dance-Revolution-Similar-Pad and was looking for an idea to hack it into something more usefull or, at lease, fun. It wasn't hard to find that someone already did an Arduino library to read a PlayStation controller. You can find it here. Best regards to it's author, Bill Porter.
My idea to reuse the PS2 controller was to recreate the game Simon.

Simon was a very popular electronic game among 80's kids. Brazilians knew it by the name Genius. There was also a toy-robot called Percival, that came with this game on top of its head.
This is a memory game. It plays a sequence of colored-lights and sounds, and the players have to reproduce the same sequence. Each colored-button is attributed to one player, and this player is responsible to press this button at the right time.
This project is quite simple and easy to reproduce.
The code, that you can see below, uses 4 digital output pins to light the leds that represent the game sequence. It also uses one extra digital output to generate sound via a piezo-buzzer.
PlayStation controller also needs 4 digital pins, plus a ground and the 3.3 V power.
The hardware is very simple: Just 4 leds with their respective resistors and 1 buzzer. I glued everything inside an used ice-cream package, which received 4 different colors of paint to resemble the original Simon

And here is the video of this rig in action:
Fell free to download and use the code anywhere. If you find any errors, please send me an e-mail.
/* |






RSS Feeds