Color/Colour Invaders!

Welcome back to the Digilent Blog!


This is a fun little project that I was recently inspired to try out by Hamster‘s own ​Colour Invaders project.


As the name suggests, this project is similar in design to the classic Space Invaders game or (more similarly) the ​Casio’s Number Invaders on the calculator. The idea behind the game is that different colored “invaders” start marching down the LED strip and you have to fire missiles that match the color of the oncoming invader. Naturally, as you successfully destroy more of the attackers, the faster they come towards your base. Luckily, we do get a nice bonus if we successfully destroy enough of them in a row — a super shot.


My particular setup uses a set of 30 self-addressable WS2812 LEDs whose weather-proof shielding is perfect for diffusing each of the LEDs. It also utilizes a chipKIT uC32 microcontroller running Marshall‘s PICxel library, allowing it to easily control all 30 LEDs (or 900 of them) with plenty of processing power to spare.

WS2812 LED strip connected to a chipKIT uC32 micrcontroller
WS2812 LED strip connected to a chipKIT uC32 micrcontroller.

To cycle between each of the missile color options and fire the missile once it was ready, I used a PmodENC and its associated library so that my code “catches” all of the rotations of the encoder shaft.

Digilent's PmodENC
Digilent’s PmodENC.

So, what do you think? Could you survive the onslaught against the color invaders?


You can check out my YouTube video showing off some of this project in the video below:

What kind of game or fun uses for the WS2812 LEDs can you think of?

Be the 1st to vote.

About James Colvin

The biggest thing that I enjoy is learning new things. Especially things involving some type of technology; computer components, fun gadgets, games, coding techniques, etc. I love spending time with my wife and our two sons and hanging out with our friends. During my normal work day, I manage the Digilent Forum and the North American Support team.

View all posts by James Colvin →

Leave a Reply

Your email address will not be published. Required fields are marked *