2048 mbed Game using uVGAII
Overview
For our project we made a clone of the 2048 game on mbed LPC1768 using a UVGAII serial connection. The program starts with the game ready to play. Player uses 4 push buttons to direct the tiles in the desired direction: UP, DOWN, LEFT or RIGHT. The goal is to combine the numbers and get to the 2048 tile! The game ends when the player is either stuck (no possible moves in any direction) or if the 2048 tile is reached. To restart the game, player must press the reset button on the mbed.
by Reinaldo Cruz and Douglas Sigelbaum
Components
Circuit
mbed | uVGA II |
---|---|
5V=VU | 5V |
Gnd | Gnd |
TX=P9 | RX |
RX=P10 | TX |
P11 | Reset |
mbed | PBs |
---|---|
P21 | LEFT |
P22 | DOWN |
P23 | UP |
P24 | RIGHT |
Program
This program has a modified version of the 4DGL library (renamed to 4DGLtest).
Import programmbed_2048game
2048 game on mbed LPC1768 using a UVGAII serial connection. The program starts with the game ready to play. Player uses 4 push buttons to direct the tiles in the desired direction: UP, DOWN, LEFT or RIGHT. The goal is to combine the numbers and get to the 2048 tile! The game ends when the player is either stuck (no possible moves in any direction) or if the 2048 tile is reached. To restart the game, player must press the reset button on the mbed.
Please log in to post comments.