Skip to content

snobu/hat-invaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hat-invaders

Display bitmap animation on Pimoroni's fantastic Unicorn Hat.

Frame animation from Phillip Burgess / Adafruit:
https://learn.adafruit.com/trinket-slash-gemma-space-invader-pendant/animation

Written for the Pi2 Model B (should work on any Pi - i suppose - untested).

Q. "So, what exactly am i getting here?"

invaders

"YOUR COLORS ARE BAD AND YOU SHOULD FEEL BAD"

Very well then, edit invaders.c:

switch(mask) {
        case 128 : setPixelColorRGB(getPixelPosition(0,y), 166, 166, 42); break; /* yellow */
        case 64  : setPixelColorRGB(getPixelPosition(1,y),  52, 128, 42); break; /* green */
        case 32  : setPixelColorRGB(getPixelPosition(2,y),  52, 128, 42); break;
        ...

While in here look for frame duration, change my 6000 to something bigger if you want to slow it down.

INSTALLATION

git clone https://github.com/snobu/hat-invaders
cd hat-invaders
make

RUN

./invaders

I CAN'T EVEN

You can. CTRL + C to stop.

About

Draw bitmap animation on the Unicorn Hat (http://shop.pimoroni.com/products/unicorn-hat)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published