Digistump Forums

The Digispark => Digispark Libraries => Topic started by: nikhilio on January 28, 2013, 06:02:32 pm

Title: LPD8806 library with Digispark
Post by: nikhilio on January 28, 2013, 06:02:32 pm
So, I'm working on a project with the Digispark and the LPD8806 based digital addressable RGB LED strips (http://adafruit.com/products/306).  Because the Digispark doesn't support SPI, and the LPD8806 library doesn't have any processor constants to enable different sections of code, I had to hack the library to move any references to SPI calls.


I've uploaded the modified library to my github for anyone else:

https://github.com/nsthorat/LPD8806-bitbang-only


Happy lighting!
Title: Re: LPD8806 library with Digispark
Post by: jonwa on January 30, 2013, 10:54:09 pm
Might the same thing be possible to the WS2801 library found on Adafruit?
I don't know C and have no idea what "bitbanging" is, so I'm lost on this.
Title: Re: LPD8806 library with Digispark
Post by: minorthreat on February 05, 2013, 09:06:28 am
thanks! This works marvelously.
Title: Re: LPD8806 library with Digispark
Post by: nikhilio on February 06, 2013, 07:28:41 am
@jonwa -- yes it should be possible.  Just remove all the SPI references in the library.  Do a diff between the code I have on github and the official LPD8806 library from adafruit and you should be able to replicate the differences in the library you want to hack.


Bitbanging is a way to serially communicate in software, as opposed to dedicated SPI hardware.  This means that instead of using a hardware SPI (which the digispark doesn't have), we use output pins from the arduino to speak serially to the chips on the LED strip.
Title: Re: LPD8806 library with Digispark
Post by: LazzaHH on June 13, 2013, 01:12:52 pm
Thanks for building this modified library!

I am building a similar project at the moment.