The objective of this project is to create a game on the mbed similar to the popular Dance Dance Revolution series. The MPR121 Capacitive Keypad serves as the input while the sound is being played on a different mbed. Unlike the Dance Dance Revolution games, the music does not have a specific arrow pattern as the program pseudo-randomly creates arrows during the game.
We chose to use a second mbed to read from an SD card and play the .wav file from it due to performance dropping on the primary mbed when too many processes were running on it. A possible experiment is to use a .mp3 codec to play a music file instead.
|Mbed Pin||MPR121 Keypad|
In our setup, we used two 4.7 kilo-ohms resistors to pull up SDA and SCL since we did not have the breakout board for the MPR121 Capacitive Keypad.
|Mbed Pin||uLCD(with cable)||uLCD(without cable)|
|Mbed Pin||SD Card Reader||Amplifier|
Interconnections between Mbeds
|Primary Mbed||Secondary Mbed|
The game begins at a start screen where a user can choose a difficulty. Currently there are 3 difficulties: easy, medium, and hard. After the game begins, there is a counter on the top right that corresponds to how many mistakes a user is allowed before game over. The counter initializes to 15 and decrements when a user misses an arrow, presses the wrong button, or presses the right button too early. The counter increments for every correct user input. The number of arrows hit correctly is shown in the top left corner of the screen.
|MPR121 Key||Game Input|
|3||Select Easy mode|
|7||Select Medium mode|
|11||Select Hard mode|
Main Program for Game
To be loaded on the primary Mbed.
Program for .wav Player
To be loaded on the secondary Mbed.
The video below shows a demo of the program.
- Create specific arrow sequences for different songs
- Using an .mp3 codec or other item to play music, possibly through the primary mbed
- Multiplayer functionality by adding another capacitive touchpad
- Adding song choice to the start menu in addition to difficulty
Please log in to post comments.