Dance Maniax on the mbed
Overview
This is the mbed version of the game Dance Maniax (https://en.wikipedia.org/wiki/Dance_Maniax). It is based on the game Dance Dance Revolution except instead of panels that you step on, it uses four sensors for the hands. This game uses one Sharp IR sensor, although more sensors could be added if an external power supply is used. When the player starts the game, a separate thread starts to play a song. An orb is drawn to the screen and travels upward until it gets to the top, and then it gets reset to the bottom. If the player passes their hand through the sensor at the same time the orb is within the given bounds of the screen they get one point. If the player gets five points in a row and continues the combo, the amount of points received is doubled.
Components
- mbed
- uLCD screen
- Sharp IR sensor
- Speaker
- 2 pushbuttons
- SD card
Pinouts
IR sensor | mbed pin |
---|---|
red wire | VU |
yellow wire | p17 |
black wire | gnd |
uLCD | mbed pin |
---|---|
Reset | p20 |
GND | gnd |
TX | p9 |
RX | p10 |
5V | VU |
SD card | mbed pin |
---|---|
DO | p6 |
GND | gnd |
SCK | p7 |
VCC | Vout |
DI | p5 |
CS | p8 |
PB1 | mbed pin |
---|---|
+ | p21 |
- | gnd |
PB2 | mbed pin |
---|---|
+ | p22 |
- | gnd |
Speaker | mbed pin | transistor |
---|---|---|
+ | collector | |
p18(with 1k resistor) | base | |
- | gnd | emitter |
Program
Import programDance_Maniax
mbed version of the Dance Maniax game
Problems
Using the Class D Audio Amp with speaker causes feedback that interferes with the IR sensor and will cause the sensor to sense movement when there is none. The amplifier also causes a little bit a lag when printing to the uLCD.
Improvements
- Create an orb class that randomly generates multiple orbs and use multiple sensors for user input.
- Add song selection and difficulty.
- Add a "life meter" that decreases for every miss
Please log in to post comments.