Author Options:

[vid] Addressable led strips Answered


I just finally got my sparkfun led strips working with the fastSPI code posted by Daniel Garcia.
Not enough info to post an instructable yet -- What projects would you want to see done with this?

I was using just bitbanging to make the arduino spit out the animations in software serial, and it was brutal hard on the processor -- barely had enough cpu to shift out the data, let alone calculate the animation.  Special thanks to the fastSPI code I found the hardware serial can do all the communication work and the processor can concentrate on animating.

I will be posting a full ible but need more ideas!

From my vid description:
Got 64 RGB leds wired up using only 2 spi communicaton wires in excess of 100fps leaving tonnes of cpu overhead room for calculating the animation. *(I have to use delays to slow down the animation or its too fast to see with the eye, let alone capture with a camera)

Strip: http://www.sparkfun.com/products/10312 (x2)
Waterproof self-adhesive rgb addressable strips. INSANELY bright for 5050 leds. at full white 2 strips draws just under 2 amps/5 volts, they get a bit warm but nothing serious.

uC: Arduino mega 1280; I found my duemilenove didn't have the storage capacity for this program. Anything 'uno' or better should do.

Library: http://code.google.com/p/fastspi/
Special thanks to Daniel for writing his amazing library. Has support for many types of led strips and absolutely destroys software serial for getting the data out! This is the sample animation that comes with the library to get you started. It took just a bit of tweaking the software and wiring to get it working.

Planned projects:
Ambilight for computer
Midi drum/keyboard visualizer
Random party light/vu meter



7 years ago

So, how does his software code beat software serial.....is he using hardware SPI ?


Reply 7 years ago

To clarify; arduino doesn't natively support SPI -- and the strips aren't necessarily SPI, so his code tricks the spi hardware into taking cleverly crafted 'serial' data and spitting it out in a way that lets the strips work.


Reply 7 years ago

Yeah, the ible will explain in better detail, but software serial I can get several thousand bit instructions per second. With hardware spi you get close to millions.


7 years ago

Make a belt or hat band add an accelerometer select a light pattern
now maintain that pattern as you spin in dance relative to the room.

Should be a sleeper on a guy and an instant eye catcher on a gal.