Doodle Jump for mbed with IMU control

Overview

For our project, we made a simplified version of the game Doodle Jump using a uLCD-144-G2, a LSM9DS1 IMU, a speaker with a Class D high-efficiency audio amplifier, and an SD card reader. An external 5V power supply was used along with the mbed 3.3V in order to sufficiently power all the devices. When the mbed powers on, the IMU initializes and then the game gives a 3 second count down before starting. The player tilts the device left or right in order to control the direction of the in-game character. The character must jump on platforms in order to progress and gain points for its score. if the character reaches the bottom of the screen, the game is over.

The character is a 9x10 pixel image located in the sd card. The mbed takes the picture and draws it onto the screen. Sound is played on every successful platform jump, and a losing song is played at the end when the player loses.

/media/uploads/bhill42/img_20160316_102039.jpg /media/uploads/bhill42/mbed_game.jpg

Components

Circuit

uLCD

mbeduLCD Header
5V = External 5V5V
GndGnd
TX = P28RX
RX= P27TX
P30Reset

I2C

mbedLSM9DS1
VOUTVDD
GndGnd
P9SDA
P10SCL

Amplifier and Speaker

mbedamplifierSpeaker
Gndpwr - (gnd), in -
5V = Extermal 5Vpwr +
p18(any PWM or D/A)in+
out++
out--

SD Card reader

mbedSD Card reader
VOUTVCC
GndGnd
p8CS
p7SCK
p6DO
p5DI

Program

Import programmbed_4180_lab4

Simplified Doodle Jump game for mbed

Files for SD Card: /media/uploads/bhill42/doodlejumpfiles.zip


Please log in to post comments.