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.

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.

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?