Mine Field Game with Thumb Joystick
- Thumb Joystick
- SD Card
For this lab we have created a mine field game using thumb joystick to control movements of the player. Speaker, SD card, and uLCD was used for audio and visual effects.
|VCC||p 40 - Vout|
|GND||p 1 - GND|
VERT is used to control vertical direction and HORZ is used to control horizontal direction. VCC and GND connections are for power. SEL is not used in this demo.
Follow the link on how to setup a speaker. In our demo the speaker connected to pin 18.
Follow the link to setup your SD card.
Follow the link to setup your screen.
Code for Mine Field
Mine Field Game
As you can see in the video on the first try we purposely step on the mine to lose and "You lose!". Second time around we avoid all of the mines in three rounds. and after we win sound of applause is played by the speaker and "You won!" is appeared on the screen. The mines are seen on the screen but they can be disabled by commenting out "#define MINE" in the beginning of the main.cpp code;
Please log in to post comments.