Color/Colour Invaders!

0

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?

Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on RedditShare on TumblrShare on LinkedInShare on StumbleUponEmail this to someone
Share.

About Author

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 Jessica and my son Kiernan and hanging out with our friends.
Random fact: I really enjoy Disney movies, looking at MtG cards, Super Smash Bros, and Monster Hunter.

Leave A Reply