Jump to content

'Tis the season to Arduino, fra-la-la-la-la la-la-la-la


G+_Chris O'Riley
 Share

Recommended Posts

lights.jpg

'Tis the season to Arduino, fra-la-la-la-la... la-la-la-la....

 

I had been itching to do an Arduino project, and we just picked up a Christmas tree, so I made a small wreath from the bottom few branches we had to cut off and thought I'd make a string of WS2812 LEDs to light it up.

 

I had never programmed with arrays, so I decided to challenge myself. I wrote a sketch that populates a 3 x 10 array with random values and then fades from one color to another. When individual LEDs reach their To color, another set of RGB values is chosen for that LED and it begins fading to that color. Trivial stuff for some I'm sure, but not being much of a programmer, it was a good exercise for me.

 

The whole thing was small enough to fit on an ATtiny 85 with room to spare. It only uses 33% of dynamic memory on the 85, so I could probably triple the number of LEDs... if I was so inclined to solder together that many... which I'm not! It draws about 130 milliamps, so I could probably get several hours from a AA with a voltage booster, but for now, it's just running from a USB phone charger.

 

I'll take a video of it in action, but here's a photo of the string and the sketch, if anyone might be interested.

 

http://www.chris3d.com/files/holiday_lights.zip

Link to comment
Share on other sites

 Share

×
×
  • Create New...