Author Topic: LPD8806 library with Digispark  (Read 6423 times)

nikhilio

  • Newbie
  • *
  • Posts: 3
LPD8806 library with Digispark
« 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.  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!

jonwa

  • Newbie
  • *
  • Posts: 17
Re: LPD8806 library with Digispark
« Reply #1 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.

minorthreat

  • Newbie
  • *
  • Posts: 5
Re: LPD8806 library with Digispark
« Reply #2 on: February 05, 2013, 09:06:28 am »
thanks! This works marvelously.

nikhilio

  • Newbie
  • *
  • Posts: 3
Re: LPD8806 library with Digispark
« Reply #3 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.
« Last Edit: February 06, 2013, 07:31:06 am by nikhilio »

LazzaHH

  • Newbie
  • *
  • Posts: 5
  • Bouncing around the world.
Re: LPD8806 library with Digispark
« Reply #4 on: June 13, 2013, 01:12:52 pm »
Thanks for building this modified library!

I am building a similar project at the moment.