Pong game on mbed LPC1768

Description

For the mbed mini project, we developed a simple pong game using an ARM mbed LPC1768 microcontroller, a smart uLCD, speaker, seven segment display and two push buttons.

The game begins when the player presses the restart button on the mbed. The player then uses the push buttons to move the paddle in either direction. The game keeps score on a seven segment display but the player decides when the game is over. Be sure to connect resistors at each leg of the seven segment display to ensure the LED's don't draw too much current. There is also a speaker incorporated which beeps whenever the ball touches the paddle or the walls. The speaker is amplified using a class D audio amplifier. Also there is a beep for around 0.7 seconds when the ball fails to make contact with the paddle which means the game is over!

Video

This video illustrates how the game is played.

Components

Image

/media/uploads/kewlsrini/20160317_155627.jpg

Hookup Guide

mbeduLCD
5V =VU5V
GNDGND
RX (P27)TX
TX (P28)RX
P29Reset
mbed7 segment display
5V=VUV+
P11A
P12B
P13C
P14D
P15E
P16F
P17G
SpeakerTPA2005D1External power supplymbed
-pwr+5 V-
-pwr-gnd-
-in+-P26 (PWM)
+veout+--
-veout---

Program

Import programLab2

One player pong with seven segment display for score keeping


Please log in to post comments.