From ComputerClubIndia
This is the outline of the first workout since the formation of Computer Club India at FOSS.in 2009.
A Google search for DIY Dance Pad reveals that making the dance pad for use with StepMania has been a popular pet project. We still chose this as our first workout for a few reasons - one, we hope to get some good hold on using Arduino and making circuits based on Arduino. Two - for pure fun - to be able to dance on our own dance pads, to the tunes we like. ;-)
Contents |
What is DDR?
DDR, an abbreviation for Dance Dance Revolution, is a popular arcade dance game where players stand on a "dance pad" and hit colored arrows laid out in a cross with their feet to musical and visual cues. Plays are judged by how well they time their dance to the patterns presented to them and are allowed to choose more music to play to if they receive a passing score.
Stepmania, an open source software, brings this arcade game to the confines of a home and allows for players to play this game on their PCs. Users are required to procure a dance pad that would connect to the PC, typically through USB. Users can generate step files for their favorite songs using Dancing Monkeys, another opensource software.
Dance Pad using Arduino
As part of this workout, we intend to make a 3x3 square dance pad. Wires from each of the squares of this mat will connect into inputs of Arduino. Arduino will connect to the PC through USB, the PC detecting it as a joystick.
The workout will be split into following exercises to make effective use of everyone involved.
- Making the Dance Pad
- Making Arduino function as a joystick and getting it to work with StepMania (without the actual dance pad).
- Integration of the above components to have a fully functional dance pad
Dance Pad
We intend to make up a dance pad with a yoga mat, as described in [1], more for reasons of simplicity and ready availability. However, we'll try to follow the guidelines mentioned in [2], as much as possible.
Arduino as a joystick
We have a Arduino Duemilanove, based on ATMega328. The board has a USB interface through which it can be powered and programmed. The idea is that at the end of the exercise, when Arduino is completely programmed, the unit will be plugged into a PC and will get detected as a joystick, without the need for installation of any drivers.
This exercise will involve the tasks listed below. Reference [2] will be used as a guideline:
- Getting to know the basics of USB HID detection - what does it take for a peripheral to be detected as a joystick.
- Programming Arduino so that it can be detected as a joystick.
- The inputs will be connected from the pad - so come up with a way to detect and calibrate the foot taps on the pad. Then program Arduino so that it generates appropriate joystick events.
- Possible auto calibration
Integration
The final step is to integrate the dance pad and Arduino configured as a joystick
References
Sources and Artefacts
All artefacts and sources that will be generated as part of the exercise will be made available on Sourceforge (TBD)