Lab 4 for ECE4180, final verison
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player
Fork of Lab4-Reversi-v2 by
Overview
For our project, we created the 2 player game “Reversi”, otherwise known as Othello using the uLCD-144-G2, a Sparkfun 5-way Tactile Switch Joystick, a speaker with a Class D audio amp breakout board, and SD card reader. The program begins with the dark player’s turn, and the joystick is used to move the red cursor box around. Pressing down on the joystick will attempt to put a piece down, resulting in a flipping sound, and will show an X on the screen for invalid moves. The game will finish when the board is filled, and go to a result screen, playing a victory sound. The result screen allows for a play again option.
Components
- /users/4180_1/notebook/using-a-navigation-switch-digital-joystick/
- /users/4180_1/notebook/ulcd-144-g2-128-by-128-color-lcd/
- /users/4180_1/notebook/using-a-speaker-for-audio-output/
- /cookbook/SD-Card-File-System
Wiring
mbed | Cable | uLCD |
---|---|---|
P28 | TX | RX |
P27 | RX | TX |
P29 | RES | RESET |
VU | +5V | +5V |
GND | GND | GND |
mbed | SD Card Reader |
---|---|
P5 | DI |
P6 | DO |
P7 | SCK |
P8 | CS |
GND | GND |
Vout | VCC |
mbed | Amplifer | Speaker |
---|---|---|
P18 | In + | |
GND | GND | |
VU | PWR + | |
Out + | + | |
Out - | - | |
GND | PWR - |
mbed | Joystick |
---|---|
P14 | Up |
P13 | Center |
P12 | Left |
P11 | Down |
P10 | Right |
GND | - |
Vout | + |
Program
Import programLab4-Reversi-Final
Lab 4 for ECE4180, final verison
History
Final
2016-11-01, by aolmenki [Tue, 01 Nov 2016 23:30:44 +0000] rev 3
Final
Added Sound and instant end
2016-11-01, by EvolutionOfWar [Tue, 01 Nov 2016 13:59:02 +0000] rev 2
Added Sound and instant end
reversi v1 with EvolutionofWar;
2016-11-01, by aolmenki [Tue, 01 Nov 2016 11:46:09 +0000] rev 1
reversi v1 with EvolutionofWar;
Lab4 Reversi 3:22pm
2016-10-31, by EvolutionOfWar [Mon, 31 Oct 2016 19:22:51 +0000] rev 0
Lab4 Reversi 3:22pm