Bike helmet Larson scanner [U]

A friend wants a Knight Rider style Larson scanner for the back of his cycle helmet. Simple enough. Especially now we have intelligent LED strips available, which only need power plus one data wire to drive a load of LEDs.

Note: if you want to do this sort of thing, make sure you understand the dangers of having LiPo batteries close to your head, and take suitable precautions – see the note at the bottom of this post.

But first things first: I knocked out some very quick and dirty code to do a nice scanning effect (thanks Adafruit for the WS2812 library! Doesn’t half save some time) My code is here. Nothing fancy, but it has a nice decay effect, and a gamma lookup table to keep things pretty. Used an Arduino Mega board to do the testing:

russlarseon-001-1

The code works fine, but it needs to run from something a bit smaller than an Arduino. An Attiny85 does just as well (the 45 would probably have worked but I don’t have any): Continue reading