Pages: [1]   Go Down
Author Topic: LPD8806 Addressable LED Strip Library (32 LEDs)  (Read 2840 times)
0 Members and 1 Guest are viewing this topic.
Los Angeles, CA, United States
Offline Offline
Full Member
***
Karma: 2
Posts: 212
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently got this addressable led strip (http://store.rebootstudio.com/lpd8806-addressable-flexible-led-strip-waterproof). I have it running using the tutorial from Adafruit: http://learn.adafruit.com/downloads/pdf/digital-led-strip.pdf

However I cant figure out how to make my own sequence (Change the color of an individual LED).
My end goal is to create a light painting like this: http://mrossphoto.com/wordpress32/dlwblog/

Is there a guide or library that is for the LPD8806 version of the Digital LED Strip?
Logged

C program run. C program crash. C programmer quit.

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All of the instructions and detailed videos are on that page.  Including details on how to create the code necessary for your own sequences.
Logged

Los Angeles, CA, United States
Offline Offline
Full Member
***
Karma: 2
Posts: 212
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So even if I have a LPD8806 RGB LED Strip I can use the same code as the HL1606 RGB LED Strip?
Logged

C program run. C program crash. C programmer quit.

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Compare the datasheets, see what signals and bits are needed for both.  If they're the same then you're good to go.  If they're not, it shouldn't be too hard to modify.

If you use the FastSPI library, it will work with either (and many others.)  http://code.google.com/p/fastspi/
Logged

Los Angeles, CA, United States
Offline Offline
Full Member
***
Karma: 2
Posts: 212
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks that library looks very useful!
Logged

C program run. C program crash. C programmer quit.

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The write up doesnt go into custom code but checkout my gist for some that I did to start, I tried to clean up the code to make it reader friendly:
https://gist.github.com/3671953

I did another project for halloween and made a bunch more effects like pulse and multiple scanners/chasers.

Take a look at my basic project which uses only two colors and you should be able to see how they are done since they are very basic.

Code:
strip.setPixelColor(i, 0, 0,0); 
i = the pixel location. 0 is the first LED, 1 is the next, etc.
0,0,0 = the color using 21bit (0-127)
     
Code:
strip.show();

This will tell the LEDs to show the last setting.

You can create variable to use for the colors, and loops to set what color to set the strip.

Code:
for (int i = 0; i < 160; i++){       
      strip.setPixelColor(i, 0, 0,0); 
      strip.show();
    }
This example will turn all LEDS to 0 (off).  You could have the .show after the loop but its so fast it doesnt matter in this case.


Again, just play around with some of the basic effects and see what happens.  Easiest way to start to understand how the arduino code works.

Logged

Pages: [1]   Go Up
Jump to: