Note Hitting Game for mbed

Description:

This notebook page covers a Tap Tap style game for the mbed LPC1768. A joystick peripheral is used by the player in an attempt to hit notes as they appear in three different lanes on an LCD. A speaker is also part of the setup and plays a tone when the user attempts to hit a note.The game takes note of the player's current note streak and adjusts their point multiplier based on the current streak. Once the player loses all their lives by either missing notes or making an input on the joystick when there is no note present, the game ends and the player's score is shown.

Hookup Guide:

For the Joystick:

MbedSparkfun Nav Switch Breakout
Gnd-
p30 (Any Digital I/O pin)R
p29 (Any Digital I/O pinR
p28 (Any Digital I/O pinL
p27 (Any Digital I/O pinC
p26 (Any Digital I/O pinU
+

For the Speaker and Audio Amp Breakout Board:

mbedTPA2005D1Speaker
gndpwr - (gnd), in -
Vout (3.3V) or 5Vpwr +
p21 (Any PWM or D/A)in +
out ++
out --
Any DigitalOut pin(optional)S (low for shutdown)

You can also hook-up a potentiometer to the three volume terminals on the TPA2005D1 in order to be able to adjust the volume on the fly.

SparkFun MicroSD Breakout Board:

MicroSD Breakout Boardmbed
CSp8 (DigitalOut)
DIp5 (SPI mosi)
VCCVout (3.3V)
SCKp7 (SPI sclk)
GNDGND
DOp6 (SPI miso)
CD

DO NOT HOOK UP VCC TO 5V, IT COULD DAMAGE YOUR SD CARD.

uLCD:

uLCD jumper wiresmbed
+5VVU (5.0v)
RXp14 (any Serial rx pin)
TXp13 (any Serial tx pin)
GNDGND
RESp11 (Any DigitalOut pin, Optional)

Note that normally, the tx pin from the mbed would need to go to the rx pin on the uLCD, and the rx pin from the mbed would need to go to the tx pin on the uLCD, but the jumper wires that come bundled with the uLCD do this already. The labels on the jumper wires are the correct labels. The jumper wires should be attached to the uLCD on the set of 5 pins closest to the user if the user is holding the uLCD with the part number at the bottom. The +5V marker on the jumper wires should be on the far right when attaching the wires.

Complete Setup:

/media/uploads/jmpin/img_2256.jpg

The black thing under the joystick is a small piece of rubber used to brace the joystick so that it does not move when used.

Import programMbed_Note_Game

A note hitting game for the mbed LPC 1768. User uses a joystick to hit notes as they come down the screen in 3 different lanes.

Video:

Here is a quick video of the game being played. The colors are hard to differentiate from each other in the video but they are much clearer to the naked eye.


Please log in to post comments.