2 player Tron with uLCD-144-G2 and 5-way tactile switch
Overview
The classic arcade game Tron recreated on an mbed using the Serial Miniature LCD module from 4D Systems as the visual interface, the 2 joysticks as the player input, and the SD card reader with a speaker for the game sound! Battle your friends to see who is superior program!
Tron is a 2 player game where each player moves in a straight line and leaves behind a trail or a "wall". Each player is able to control which direction where they turn and try to block the opponents path. If any player crashes into the outer wall or into a wall that either player has created, then that player loses.
By Martin Yeh and BumJun Park
Setup
Components
- mbed LPC1768
- uLCD
- 2x 5-way tactile switch
- SD Card Reader
- Audio Speaker
- 2N3904 General Purpose Amplifier
- Micro SD card
- 1k resistor
Pin Out
uLCD
| mbed | uLCD |
|---|---|
| VU | 5V |
| Gnd | Gnd |
| P8 | Reset |
| P9 | RX |
| P10 | TX |
SD Card Reader
| mbed | SD Card Reader |
|---|---|
| P5 | DI |
| P6 | DO |
| P7 | SCK |
| Vout | Vcc |
| Gnd | Gnd |
| P27 | CS |
Player 1 Joystick
| mbed | Joystick |
|---|---|
| Vout | + |
| P11 | U |
| P12 | C |
| P13 | L |
| P14 | D |
| P15 | R |
| Gnd | - |
Player 2 Joystick
| mbed | Joystick |
|---|---|
| Vout | + |
| P16 | U |
| P17 | C |
| P19 | L |
| P20 | D |
| P21 | R |
| Gnd | - |
Speaker
| mbed | 2N3904 | Speaker |
|---|---|---|
| P18 | B | |
| Gnd | E | |
| C | Black Speaker Wire | |
| Vu | Red Speaker Wire |
Micro SD Card
Download both of these .wav files by click on the links, right-click the media player, and click "Save as..." After you download these, copy them to the Micro SD Card under the file directory wavfiles/*filename*.wav.
Gameplay
Code
Import program2PlayerTron
2 Player Tron
Please log in to post comments.
