Tap Tap Revenge Mbed

This notebook is about the game Tap Tap Revenge on the mbed. It compares sparkfun keypad inputs 0 through 3 to the current "note" being played in the song and on the uLCD screen. The ShftBrite will turn the color green if the user gets the "note" right, or red if the user is wrong. The game ends at about halfway through the song My House, by Flo Rida. The user's score is displayed and he or she either receives affirmation or a mild insult. The game requires an mbed LPC 1768, a sparkfun keypad, a 5V external power supply, an SD card and reader, an audio amplifier, a ShiftBrite, and a speaker. You can play with the timing of the "notes" by changing the Thread::wait() parameter in main.cpp line 234.

(https://en.wikipedia.org/wiki/Tap_Tap_Revenge)

/media/uploads/bricecroxton/taptaprevenge_WUDZopO.jpg

Program Code

Import programTapTapRevengeMbed

Tap Tap Revenge Mbed Game

Input Files

Two input files are required: an audio(.wav) file and a text file. The audio file should be sampled down to around 8KHz so the that the game will run smoothly. The text file should consist of many lines that contain a single integer between 1 and 4, inclusive. These numbers represent the permutation of circles that appear on the LCD screen.

Set-Up

/media/uploads/bricecroxton/mbed_hookup.png

Hookup Guide:

SD Card Reader

mbedSD Card
P8CS
P5DI
VOUTVCC
P7SCK
GNDGND
P6DO
NC(No Connect)CD

Touch Keypad

mbedTouch KeypadPullups
GNDGND
P9SDA4.7K
P10SCL4.7K
P21IRQ
VOUTVCC

ShiftBrite

ShiftBritembed
GNDGND
DIP11
LIP15
EIP16
CIP13
VU(5V)V+

Audio Amplifier

mbedAmplifierSpeaker
gndpwr - , in -
5V Externalpwr +
p19in +
out ++
out --

LCD Screen

mbeduLCD HeaderuLCD cable
VU(5V)5V5V
GndGndGnd
P28RXTX
P27TXRX
P30ResetReset

Example Video


Please log in to post comments.