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?

Author

  • James Colvin

    A local Digilent employee who is sometimes tricked into making other content besides documentation and supporting customers on the Digilent Forum, but then I get to write a little more informally so that's a plus. A sassy engineer, lover of puns and dad jokes, father and husband. I know both way too much and simultaneously almost nothing about a number of nerdy topics. If you want to hear me rant, ask me what data rate USB C operates at.

Be the 1st to vote.

About James Colvin

A local Digilent employee who is sometimes tricked into making other content besides documentation and supporting customers on the Digilent Forum, but then I get to write a little more informally so that's a plus. A sassy engineer, lover of puns and dad jokes, father and husband. I know both way too much and simultaneously almost nothing about a number of nerdy topics. If you want to hear me rant, ask me what data rate USB C operates at.

View all posts by James Colvin →

Leave a Reply

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