Extended Raspberry Pi Library for the LPD8806
Moderators: adafruit_support_bill, adafruit

Extended Raspberry Pi Library for the LPD8806

by adammhaile on Sat Oct 06, 2012 10:08 am

I'm in the middle of a large lighting project using a Rapsberry Pi to control some LPD8806 LED strips and the original library post was actually created the same day I got started. It got things started nicely but I was already used to all the built in functions and animations from the Arduino library, so I decided to extend the library with more animations and some helper methods and classes to make using it easier.

Eventually this will be part of a network controlled lighting system but it's quite usable for just about any application.

Library is hosted here: https://github.com/adammhaile/RPi-LPD8806
There is a demo video here: http://www.youtube.com/watch?v=g5upsgqASiY

Bug and feature patches are welcome.
adammhaile
 
Posts: 40
Joined: Fri Sep 10, 2010 9:09 am

Re: Extended Raspberry Pi Library for the LPD8806

by adammhaile on Sat Oct 06, 2012 10:49 am

Some of the added features are:
- Brightness control for the whole strip. No more having to manually modify the RGB inputs to achieve the desired max brightness.
- HSV support. This is really great for moving in a natural progression through the colors.
- All of the animations that come with the LPD8806 Arduino library including a couple more of my own.
- The LPD8806 doesn't actually specify the order of the color channels so some strips are different than the ones from Adafruit. The order of the Adafruit strips is the default but you can call setChannelOrder() to change it without any modifications to the library.
adammhaile
 
Posts: 40
Joined: Fri Sep 10, 2010 9:09 am

Re: Extended Raspberry Pi Library for the LPD8806

by Jerware on Sun Oct 07, 2012 12:30 pm

This is wonderful! I was just about to move my LPD8806 tinkering over the the Pi to try it out. Thank you for sharing.
User avatar
Jerware
 
Posts: 16
Joined: Fri Aug 31, 2012 7:13 pm
Location: San Francisco, CA

Re: Extended Raspberry Pi Library for the LPD8806

by adammhaile on Sun Oct 07, 2012 10:25 pm

Thanks! Stay tuned... I'm currently working on a web interface for all of it as well. Combination of a JSON API and actual web interface to control color, animations, etc.
adammhaile
 
Posts: 40
Joined: Fri Sep 10, 2010 9:09 am

Re: Extended Raspberry Pi Library for the LPD8806

by buton on Fri Oct 12, 2012 11:49 am

nice this is great news for the PI
buton
 
Posts: 54
Joined: Fri May 11, 2012 8:06 am

Re: Extended Raspberry Pi Library for the LPD8806

by featherodd on Sat Oct 13, 2012 12:03 am

@adammhaile: this library is very impressive. thank you so much for posting it!
featherodd
 
Posts: 15
Joined: Sat Sep 17, 2011 11:58 pm

Re: Extended Raspberry Pi Library for the LPD8806

by jeh on Mon Oct 15, 2012 3:40 pm

do you have a blog or something where I can follow your progress? or is this the appropriate place to see your updates?
jeh
 
Posts: 3
Joined: Mon Dec 29, 2008 4:36 pm

Re: Extended Raspberry Pi Library for the LPD8806

by Jerware on Mon Oct 22, 2012 7:41 pm

I'd be curious about any updates you might have made as well. I just got my 16x16 matrix wired up, and your example script is beautiful! :)
User avatar
Jerware
 
Posts: 16
Joined: Fri Aug 31, 2012 7:13 pm
Location: San Francisco, CA

Re: Extended Raspberry Pi Library for the LPD8806

by adammhaile on Wed Oct 24, 2012 10:35 am

@Jeh - I have a blog at http://adamhaile.net but, at the moment, it's mostly all about my Pandora Radio client for Windows, Elpis.
I will, however, definitely be posting about the LPD8806 project very soon. I've just been in the middle of a long distance move, so time has been at a premium lately.

@Jerware - Thanks! I'm looking to build a matrix as well, though it will probably be Arduino powered. Thinking some sort of audio EQ display. What are you planning on using the 16x16 matrix for?
adammhaile
 
Posts: 40
Joined: Fri Sep 10, 2010 9:09 am

Re: Extended Raspberry Pi Library for the LPD8806

by Jerware on Wed Oct 24, 2012 11:11 am

adammhaile wrote:@Jerware - Thanks! I'm looking to build a matrix as well, though it will probably be Arduino powered. Thinking some sort of audio EQ display. What are you planning on using the 16x16 matrix for?


I've designed an acrylic case for it and plan to mount it on the wall. With the Pi so easy to get on Wifi, sending images to it is a snap. I had larger plans about pulling data from the Internet, but for now it's just going to be a pixel art showpiece. 16x16 is great for the old 8-bit game sprites.

By the way, you should check out this project called PixelPi:
http://thegreatgeekery.blogspot.ca/2012 ... s2801.html

It has some nice features, like PNG display on a grid/matrix (and can even pan across a long image), but it also hooks up to some interesting free software called Pixel Invaders that displays real-time effects. The LPD8806 support was a bit buggy in the latest release, so if you grab it follow my fixes in the comments toward the bottom of that page.
User avatar
Jerware
 
Posts: 16
Joined: Fri Aug 31, 2012 7:13 pm
Location: San Francisco, CA

Re: Extended Raspberry Pi Library for the LPD8806

by grantpatterson on Tue May 21, 2013 12:44 pm

Hi all, I'm excited to use this library with my new Raspi! I just learned that it runs at 3.3V, while the strip is 5V. Are the Raspi's high levels enough to drive (a lot of) LPD8806s? Or will I need a logic level converter?
grantpatterson
 
Posts: 5
Joined: Wed Aug 24, 2011 3:52 am

Re: Extended Raspberry Pi Library for the LPD8806

by adafruit_support_mike on Wed May 22, 2013 1:35 am

grantpatterson wrote:Are the Raspi's high levels enough to drive (a lot of) LPD8806s?

Yes. This tutorial on light painting by our resident blinky-stuff guru shows how to connect LPD8806 LED strips to a RasPi: http://learn.adafruit.com/light-paintin ... i/hardware
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10114
Joined: Thu Feb 11, 2010 2:51 pm

Re: Extended Raspberry Pi Library for the LPD8806

by karlm on Wed Aug 28, 2013 12:22 pm

Is it me, or does anybody else not seem to get the LED strip to behave properly using this library?

I have been looking at the code, stepping through it, and the results I get are, at best, sketchy.
To be more specific, the all_off() method does not. I have tried different pixel range(s). 0-31, 1-10, 0-0 and none actually turn off pixels after running the example.py.

I also tried each of the different channel orders (GRB, RGB ...)

The example.py seems to randomly turn pixels in the http://www.adafruit.com/products/306 32 led strip to various colors (all full brightness), and leaves them at whatever state they were at last when the program ends (none were left off). I have checked, and triple-checked the wiring. It is exactly as the adafruit tutorial suggests(http://learn.adafruit.com/light-paintin ... i/hardware).

What am I missing here? I have checked, and it is a LPD8806S chip on the strip.
I put no other hardware in the mix (just the 10A power adapter, the RPI, the strip and my wiring.
Any ideas? Thanks in advance.
karlm
 
Posts: 6
Joined: Wed Jul 11, 2012 3:34 am

Re: Extended Raspberry Pi Library for the LPD8806

by packetslave on Thu Oct 03, 2013 1:54 am

I'm seeing the exact same behavior as karim: all LEDs on at full brightness and the Python library does random things but not what I'm telling it to do.

all_off() doesn't, calling functions like set() or fill() followed by update() does something, e.g. random pixels change colors but not the ones I want, nor to the colors I specify. I can't get the LEDs to turn off no matter what I do.

My wiring is pretty basic. DI to the Pi's MOSI, CI to the Pi's SCLK, separate 5V power supply to the strip.

I unfortunately do not have an Arduino to test with.
packetslave
 
Posts: 2
Joined: Thu Oct 03, 2013 1:28 am

Re: Extended Raspberry Pi Library for the LPD8806

by packetslave on Thu Oct 03, 2013 2:10 am

Answering my own question. The fix was to run a shared ground wire between the 5V supply for the strip and the Pi (I was powering the Pi off USB). Once I had a common ground, the library worked flawlessly.
packetslave
 
Posts: 2
Joined: Thu Oct 03, 2013 1:28 am