Pixel Game
The Repo


The goal of this project was to implement a RGB-Matrix with the LPC4088 chip to create a simple pixel game. This game uses the NXP LPCxpresso development board to interface the RGB display.

Class:Sensor and peripheral design - UC Santa Barbara
Parts:LPC4088 chip, NXP LPCxpresso, Adafruit RGB-Matrix, Joystick, Pezo Speaker


DemoComing soon: better quality video

How It Works

This project contains a custom spi based protocol to interface with the RGB matrix. Along with the RGB matrix there is a speaker that loops through playing the Tetris and Doctor Mario theme. This speaker interface uses code ported from a Tetris song arduino project. The game all runs around the LPC's button interrupts and it's timer interrupts to run the designed game.

The game is a connect four falling dot game. When the game starts the board is already fill 60% with different colored dots. Three random colored dots are then dropped from the top of the display, it is up to the player to line the dots up with other dots to make them dissapear. The dots can be connect horizontal, vertical, or diagonally. The game is won when all the dots are cleared from the board and lost when a dot lands on the top row of the matrix. The game is then restartes after a win or a loss and is also able to be paused at anytime.

The Hardware

Pin Choices

The pins on the LPC board were chosen from pins that were able to be assigned to and pins that were not already being used by the user buttons. There was also some trial and error with finding pins that worked correctly even if they met the requirements.


The speaker had it's own dedicated pin connection but was connected throught the expansion slot as the dedicated pin did not work on our board.

PinoutThe used pins of the LPC expansion connectors
PinoutThe pinouts for the display connector

The Game


The colored dots need to be lines up with four other dots of the same color to make them all dissapear. The dots can be connected horizontal, vertical, or diagonally.


The game is controled with the joy stick. Left and right move the dot left and right. Up pauses the game and down moved the dots down faster.


The game is won when all dots are cleared from the board.


The game is lost when a dot is placed on the top row of the matrix.

Some of my other work

© 2019 Andrew Polk