Armageddon421's Hackingblog

Tag: snake

Snake on LED-Panel

by on Feb.14, 2014, under LED Panels, Projects

Hey there!

Today I want to show you a project from early 2013. Someone sold adressable LED-Stripes on the 29th Chaos Communication Congress in Hamburg and I just couldn’t resist getting me some. I bought 10 meters. The strip has 32 RGB-LEDs per meter and is made adressable by adding an IC (can’t remember the type right now) for every two LEDs. The protocol is equivalent to the WS2801, using SPI (with clock line, as opposed to the LED-integrated WS2811 which have no clock line and are pain in the a** to talk to) and therefore can easily be used directly with the raspberry pi.

Since the raspberry pi outputs a logic level of 3.3V and the LED-strip expects 5V level, some level shifting had to be done. On the 29C3 I found some nice guys giving me some SMD MosFETs, resistors and perfboard so I could fiddle together a basic level shifter. It could only handle frequencies of about 1MHz, but that was enough to make the thing shine!

The trash cans at the location had a circumference of exactly 1m, wich was ideal to just wrap the stripe around. So it happened. A USB battery pack was used to supply the thing, so it was even portable! Go party with a trash can! Unfortunately I had to leave the trash can there… This video is from the guy who sold me the stripes. Check it out!

Back at shackspace, my local hackerspace in stuttgart, I rearranged the stripes on a wooden board to make it look more like a normal LED-Panel. What game could be better on such a thing than snake? So it happened. I implemented the main thing in one night, everythin in one file. Ugly. Works. The rest of the time was spent optimizing the bot. Did I say bot? Yes I did. One weekend later I made this video showing off the result. Unfortunately it is german. Watch it.

Things like plasma effects look super smooth!

Later I added a proper level shifter, allowing stable bus clocks of up to 8MHz and much higher framerates. Next steps include prettifying, that means building a nice enclosure with milk glass and maybe cleaning up the code.

The code can be found over at github.

That’s it for now. If there are any questions… You know the drill!

Leave a Comment :, , , , , , , , more...