Mbed DuckHunt
Overview
For this project, we created a game similar to Duck Hunt using the mbed, IMU sensor, uLCD display, and speaker module. The point of this game is to shoot ducks with a gun aimer, which is controlled by a small breadboard module containing an IMU sensor and a push button. The IMU sensors controls the movement of the aimer while the push button is used to shoot. The speaker module provides a gunshot sound every time the player presses the push button. A scoreboard is at the top of the uLCD which keeps track of how many ducks the player has shot. The duck moves in a straight line and bounces off walls. It also changes speed every time it hits a wall.
Video Demo
Images
Components
Connections
LSM9DS1 | Mbed |
---|---|
Gnd | Gnd |
Vout | VDD |
SDA | p28 |
SCL | p27 |
uLCD | Mbed |
---|---|
Gnd | Gnd |
Vu | +5V |
Rx | p10 |
TX | p9 |
RES | p30 |
Push Button | Mbed |
---|---|
GND | GND |
+ | P21 |
Mbed | TPA2005D1 | Speaker |
---|---|---|
gnd | pwr - (gnd), in - | |
Vout (3.3V) | pwr + | |
p26 (any PWM or D/A) | in + | |
out + | + | |
out - | - |
SD Card Reader | Mbed |
---|---|
CS | P8 |
DI | P5 |
VCC | Vout |
SCK | P7 |
GND | GND |
DO | P6 |
Code
Import programDuckHuntmbed
DuckHunt game using IMU sensor and uLCD display
Please log in to post comments.