4180 Mini Project: Pacman Game
Project Overview
For this project, we made a Pacman game using MBED with 4 push-button to control up, down, left, and right movements. The goal of this game is to make Pacman eat all the coins without being caught by the blue ghost, which moves randomly in the path. Once Pacman is caught by the ghost, the game is over.
Increase the baudrate can increase the game difficulty, since the ghost moves faster.
Video
Circuit On Board
Fig 1. Final circuit for lab4
Components
Fig 2. Push Button
Fig 3. uLCD_4DGL
Fig 4. Sparkfun PCB or breadboard mount Speaker 8ohm .1W
Fig 5. SparkFun microSD Transflash Breakout
Circuit Pinout
LCD Pin | MBED Pin |
---|---|
+5V | Vu |
RX | p28 |
TX | p27 |
RES | p29 |
Gnd | Gnd |
SDFileSystem stores the audio file.
SDFileSystem | MBED Pin |
---|---|
DO | p5 |
DI | p6 |
SCK | p7 |
CS | p8 |
Vcc | VOUT |
Gnd | Gnd |
Pushbuttons are implemented as pull-up.
Pushbutton | MBED Pin |
---|---|
Left movemen | p21 |
Right movement | p22 |
Up moment | p23 |
Down movement | p24 |
Program
Import program4180_4
Code for 4180 mini project
Please log in to post comments.