mbed Brick Breaker (uLCD)
Overview
This is a version of a Brick Breaker game. The ball speed and paddle is controlled by a tactile switch (left and right for movement, up to speed up the ball). The goal is to bounce the ball off of the paddle in order to hit the bricks without letting the ball go under the paddle. To make the ball move initially, a pushbutton must be pressed. There is a speaker that uses an amplifier, and the ball makes a sound effect anytime it bounces from a surface. The components used are uLCD (uLCD-144-G2 128 by 128 Smart Color LCD), 5-Way Tactile Switch (BOB-11187), Speaker (COM-09151) with Class D high-efficiency audio amp (BOB-11044), and a pushbutton.
Note: Game is laggy and buggy. The code to move the paddle causes the game to slow down - I could not get the thread to work properly for paddle movement. The ball and paddle constantly flashes when in movement.
Picture of uLCD
Picture of Wiring
Video Demo
Components
- mbed LPC1768
- uLCD (uLCD-144-G2)
- 5-Way Tactile Switch (BOB-11187)
- Speaker (COM-09151)
- Class D high-efficiency audio amp (BOB-11044)
- Pushbutton
Wiring
mbed | SD Card Reader | Amplifier | Tactile Switch | Speaker | uLCD |
---|---|---|---|---|---|
5 | DI | ||||
6 | DO | ||||
7 | SCK | ||||
9 | CS | ||||
10 | U | ||||
11 | C | ||||
12 | L | ||||
13 | R | ||||
14 | D | ||||
18 | IN+ | ||||
27 | Tx | ||||
28 | Rx | ||||
30 | RES | ||||
VU | 5V | ||||
VOUT | VCC | PWR+ | + | ||
GND | GND | IN-,PWR- | - | GND | |
OUT+ | + | ||||
OUT- | - |
Program
Import programBreakout_Game_copy
Brick Breaker Game
Please log in to post comments.