0

New High-Speed SPI Library for LPD8806 LED Strips
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: New High-Speed SPI Library for LPD8806 LED Strips

by pburgess on Fri Oct 28, 2011 7:13 pm

sparr: Oops! Fixed, thanks. Also fixed some probable latch issues with longer strands while there. Let us know if you encounter any strangeness.

pburgess
 
Posts: 3992
Joined: Sun Oct 26, 2008 2:29 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by ScottishDave on Fri Mar 02, 2012 6:56 am

I have been using the adafruit library, and want to try out this new one. I have tried removing the existing LDP8066 folder from my library and replacing it with the new one. However once I restart the IDE my sketches will not compile with the error that it cannot find the LDP8066 library. I'm new to this so maybe I am missing something obvious/making a newbish error ?
ScottishDave
 
Posts: 7
Joined: Fri Mar 02, 2012 6:52 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by adafruit_support_bill on Fri Mar 02, 2012 7:20 am

Did you exit and restart the IDE (all instances). It only detects new libraries at startup.

adafruit_support_bill
 
Posts: 71779
Joined: Sat Feb 07, 2009 10:11 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by ScottishDave on Fri Mar 02, 2012 8:12 am

adafruit_support wrote:Did you exit and restart the IDE (all instances). It only detects new libraries at startup.


Yes. Several times. ;-)
ScottishDave
 
Posts: 7
Joined: Fri Mar 02, 2012 6:52 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by adafruit_support_bill on Fri Mar 02, 2012 8:26 am

Hmmm. What OS are you using. Some file systems are case sensitive on file names.

adafruit_support_bill
 
Posts: 71779
Joined: Sat Feb 07, 2009 10:11 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by ScottishDave on Fri Mar 02, 2012 8:43 am

I'm using OSX 10.6.8 and using v1.0 of the arduino IDE. My target is a mega 2560.
ScottishDave
 
Posts: 7
Joined: Fri Mar 02, 2012 6:52 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by pburgess on Fri Mar 02, 2012 12:36 pm

After confirming the location and spelling (should be LPD8806, all upper case), could you see if the example sketches appear in the Arduino IDE? (File->Sketchbook->Libraries->LPD8806). Also, could you copy and paste the compiler error here? Thanks.

pburgess
 
Posts: 3992
Joined: Sun Oct 26, 2008 2:29 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by cjbaar on Fri Mar 02, 2012 1:57 pm

For what it's worth, I have not yet tested my version of the lib against IDE 1.0. It was written at 022, and still uses WProgram.h, which I believe is deprecated. I'll see what I can do about getting it updated.

cjbaar
 
Posts: 73
Joined: Fri Aug 26, 2011 5:58 pm

Re: New High-Speed SPI Library for LPD8806 LED Strips

by pburgess on Fri Mar 02, 2012 3:02 pm

Oh man, I do apologize. Serves me right for answering questions in the forums before I've had my morning caffeine. :shock:

In the time since this alternate library was originally posted, the standard version of the LPD8806 library...like the one normally downloaded from the Github repository...has been updated to include the improvements from the high-speed library. So basically, if you download and install the latest from the Adafruit repository, you're good to go.

To get the full high-speed benefit, you just change the parameters to the LPD8806() call. This is normal speed (which is still pretty decent):
Code: Select all | TOGGLE FULL SIZE
LPD8806 strip = LPD8806(32, dataPin, clockPin);

And this is high speed:
Code: Select all | TOGGLE FULL SIZE
LPD8806 strip = LPD8806(32);

Note that the latter can work only on specific pins, not reconfigurable. Please see the tutorials and comments in the example sketches for some notes on this.

pburgess
 
Posts: 3992
Joined: Sun Oct 26, 2008 2:29 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by ScottishDave on Fri Mar 02, 2012 7:13 pm

Thanks everyone - I'm away from my workbench now, but I'll give it a go in the morning.
ScottishDave
 
Posts: 7
Joined: Fri Mar 02, 2012 6:52 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by mgg on Tue Sep 03, 2013 12:44 pm

Hi all.

Recently joined the LPD8806 fanclub and making a 352-pixel strip run by a Mega. (PBurgess you know all about this one from our previous threads - thanks for help spec'ing everything). I've got all the power and connectors sorted now and diving into code. It occurs to me that someone has already written the Arduino bit that monitors serial port for incoming pixel data and blasts it to the strip - but I can't seem to find a good version to use. Can anyone point me to a code snippet for this?

It's mostly deciding which of the finnicky ways to send the data (send ASCII-to-Hex-to-Uint32-etc...?) and what delimiters to use to be most efficient while error-resistant, that I'd rather not reinvent. I'm very flexible on the packing format as I'll be controlling it from Processing, and I don't require crazy framerates for my application.

Thanks in advance!
<M>

mgg
 
Posts: 20
Joined: Mon Apr 22, 2013 3:00 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by pburgess on Tue Sep 03, 2013 2:49 pm

Hey there,

Look at the code in the Adalight project -- there's an LPD8806-specific streamer sketch (in the Arduino sub-folder), and some PC-side code for sending data (in Processing). Should cover what you need!

https://github.com/adafruit/Adalight

pburgess
 
Posts: 3992
Joined: Sun Oct 26, 2008 2:29 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by mgg on Tue Sep 03, 2013 9:12 pm

Thanks Phil! Ill check it out.

mgg
 
Posts: 20
Joined: Mon Apr 22, 2013 3:00 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by mgg on Thu Sep 05, 2013 7:39 am

Phil this is exactly what I needed. Well written, well documented, and the timeouts, test patterns, and gamma correction are a great bonus. Thanks a ton!

<M>

mgg
 
Posts: 20
Joined: Mon Apr 22, 2013 3:00 am

Re: New High-Speed SPI Library for LPD8806 LED Strips

by ergodic on Sun Oct 27, 2013 5:16 pm

Can somebody point me in the right direction for using SPI with the Due and this LPD8806 library?

I have 10m (320 LEDs) of strip that's working fine with pin 2/3. But the digitalWrite() -- even on the Due -- takes forever (about .18ms/LED). And digitalWriteFast() doesn't work on the Due.

When I change the LPD8806 constructor to leave out the pins for SPI, and then attach the strip data/clock leads to ICSP 1/3 on the Due header (what the tech description for the Due says are the SPI pins)... nada.

I have zero experience using Arduino SPI, so I'm sure I'm admitting doing something really stupid here. I just can't figure out what it is.
ergodic
 
Posts: 8
Joined: Mon Mar 25, 2013 12:33 am

Please be positive and constructive with your questions and comments.