Introduction: Dance Pad With Color LED Using Arduino
This is my first instructable. I made a colorful dance pad using Arduino board as a serial input to the computer.
It's easy to make, and cost a few resistors and LEDs(you don't have to use them).
Step 1: Materials
1. 6 LED with different colors to show that the buttons are pressed down
2. 6 220 Ohm resistor to protect LEDs
3. a general purpose solder board
4. some wire and connectors
Dance pad parts:
1. Aluminum Foil ( Which are used to bake stuffs)
2. Big paper box( you can certainly make a Wooden frame)
Step 2: The Circuit and Test
The circuit is shown in the first graph. The dance pad simply implement the six buttons show in the circuit.
As we push down each button, the LED will light up, and make the corresponding pin from LOW to HIGH. This message will be send to computer as a serial message, and caught up by a python program which then simulate this message to a key press message.
I made the circuit on a general purpose soldering board using some small connectors, so that I can easily plug it into the Arduino board which can be save for other projects. You may make a better looking board than I did, since it's rather easy, I used some wires to connect around.
Once you made the circuit, you can connect some of the wires together to see whether the LEDs light up correctly. And then you can go to the next step, setting up the software.
Step 3: Program
The arduino program sends out the correct letter to computer when ever the status of key is changed. So if you push any button, it will send out two corresponding letter, one Down, and One Up.
The python program receives the message, and then translates these to keyboard event. If it receives a 'l' letter, then the program generate a LEFT key down message. Presently, this program only runs on Windows machine, since the python SendKeys module only work on windows. You may find a way to simulate keyboard information under Mac and linux. You need to install Serial and SendKeys module for you python to run this program.
The Dance program I use is StepMania, you need to set up key map information so that when you dance the program will correctly respond. This is just like setting up the Joystick when you play games.
Step 4: Dance Pad
There are a few other great instructables on how to make a Dance Pad. Here, I'll show you how to make one with the things that you can easily get.
The dance pad is basically made up of six buttons. The idea is using two parallel Aluminum Foils which are pasted on hard boards, and then put them together with some stuff inside to separate them apart. Only when you put the two hard paper board hard, they will contact with each other.
Make six of these buttons, and put them on a bigger paper board. Then connect these buttons to the circuit we make before.
Finally you can make a cover, and draw some stuff on it.
Step 5: Ready to Run
You should run the Python program before you turn on Stepmania. Then you should be able to use your dance pad to control the program. When I made the following video, I opened the cover, so that you can see clearly what's inside.