Dueling Tanks
This is a version of the traditional dueling tanks game using the analog joystick from spark fun, a set of buttons, and a MMA8452 three axis accelerometer for control. the analog joystick controls tank movement and the MMA8452 controls the barrel angle while the buttons are used for menu and fire control. The Sparkfun amplifier is used in conjunction with a breadboard friendly potentiometer to control volume and the Sparkfun SDcard reader is used for audio clips. Haptic feedback is provided through an Adafruit DRV2605L breakout board.
At the heart of the project is the NXT LPC1768 mbed board.
The wiring for this project was completed according to the following pinouts.
Joystick
mbed | Joystick |
---|---|
GND | GND |
VOUT | VCC |
p15 | VERT |
p16 | HORZ |
p17 | SEL |
LCD
mbed | uLCD |
---|---|
GND | GND |
VU | 5V |
TX = p14 | RX |
RX = p13 | TX |
p11 | RES |
amp
mbed | TPA2005D1 | Speaker |
---|---|---|
GND | PWR-, IN- | |
VU | PWR+ | |
p18 | IN+ | |
OUT+ | + | |
OUT- | - |
accelerometer
mbed | MMA8452 |
---|---|
GND | GND |
VOUT | 3.3V |
p28 | SDA |
p27 | SCL |
I2 | |
I1 |
SD card
mbed | MicroSD |
---|---|
GND | GND |
VOUT | VCC |
p8 | CS |
p5 | DI |
p7 | SCK |
p6 | DO |
CD |
haptic feedback
mbed | DRV2605L |
---|---|
GND | GND |
VOUT | VIN |
p10 | SCL |
p9 | SDA |
IN |
Import programDuelingTanks
The classic dueling tanks game for mbed.
Demo Video.
Please log in to post comments.