Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LPD8806 not working

So, I've been using the LPD8806 Led Strip for a while using PI4J and wiringPi. Decided to upgrade Rasbian and now my led strip is not responding anymore.

Thought hey, lets try using BiblioPixel, looks like the best stuff on the market for led strips.
Set everything up but when running the example to check if it works, it throws an error:

pi@raspberrypi ~ $ sudo python
Traceback (most recent call last):
  File "", line 11, in <module>
    driver = DriverSerial(num = 10, type = LEDTYPE.LPD8806)
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/drivers/", line 99, in __init__
    resp = self._connect()
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/drivers/", line 194, in _connect
    self._com =  serial.Serial(, timeout=5)
  File "/usr/local/lib/python2.7/dist-packages/serial/", line 282, in __init__
  File "/usr/local/lib/python2.7/dist-packages/serial/", line 289, in open
    self.fd =, os.O_RDWR|os.O_NOCTTY|os.O_NONBLOCK)
OSError: [Errno 2] No such file or directory: ''

Can't figure out what the issue is, can anyone help me?
You are trying to use the serial driver. That's for our AllPixel LED controller. But I assume you are connecting the LPD8806 directly to the Pi's SPI port?
The AllPixel does support the LPD8806 (and a dozen others) but that's only for if you are actually using an AllPixel (or other USB serial device that supports the same protocol). If connecting the LPD8806 to the SPI port directly, you need to use DriverLPD8806:
Hi, Adam!

First of all, thanks a lot for developing this and being so quick to respond and helpful! I'm sure everybody appreciates your efforts.

Yes, I am using RPI with SPI and yes, I was using AllPixel stuff, stupid me.
Now, I've done a little script but it still throws an error.
Something must be wrong with my Led Strip or SPI . I've tried so many things when it comes to SPI to make it work but to no avail.

Anyway, I hope there's something wrong with my script or something:

from bibliopixel import *
from bibliopixel.drivers.LPD8806 import *
#set number of pixels & LED type here
driver = DriverLPD8806(60, c_order=ChannelOrder.GRB, use_py_spi=True, dev="/dev/spidev0.0", SPISpeed=2)
led = LEDStrip(driver)

And the error:
sudo python
INFO - spi_driver_base - py-spidev speed @ 4.0 MHz
Traceback (most recent call last):
  File "", line 8, in <module>
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/", line 123, in update
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/drivers/", line 51, in _update
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/drivers/", line 86, in update
  File "/usr/local/lib/python2.7/dist-packages/bibliopixel/drivers/", line 79, in _sendData
IOError: [Errno 22] Invalid argument

What could be wrong?
ls -l /dev/spidev* has both 0.0 and 0.1
lsmod | grep spi returns spi_bcm2835

Could my LedStrip be broken? At the moment it has almost all leds on a faded red color, don't know why, it's been like this after I've ran some tests.
Also, I'm considering buying a new LedStrip. Any advice? Which models are the best? Including price-performance,hehe.

Anyway, thanks a lot for answering!
Have a good day!
It's not your strip. For the record, those strips are one way. You would never get an error if the strip was broken.
Can you run "pip freeze" at the console and paste the results here. It looks like py-spidev updated recently and it may have broken support.
Can you try settng use_py_spi to False?
Hmm... OK, nevermind about py-spidev. I just tried your code on my RPi and it worked fine.

Still send me the pip freeze output... it will certainly help Smile
pi@raspberrypi ~ $ pip freeze
Try running "sudo pip install spidev --upgrade"
Now that I know it works with the new spidev I looked further and it seems that spidev 2.0 is broken with the newer linux kernel. So hopefully updating to spidev 3.1 should fix your problem.
Ok, set use_py_spi to False and the error is gone.

But still nothing on the LPD8806.
When I run the animation there is a flicker on the first LED on the strip, but hardly noticeable, even if it reproduces when running the animation.
All other leds are stuck on a faded red and that one led is a combination of red and blue but it doesn't change or something. It just flickers, no matter what colors I set in the script.

Could it be broken? the clock or something?

The flicker was because I had SCLK connected to DI and not CI, i switched to test something. I inverted it. The faint flicker is gone but still not working.
Also I upgraded spidev. pip freeze now shows 3.1 but still nothing on the LPD8806. Seriously starting to think there's something wrong with the led strip but it worked before upgrading to jessie... had an old wheezy raspbian on my rpi..
Check out this:

Probably is something to do with your strip, but the above is work a shot.
Are you running with sudo?

BTW... I hate Jessie so far. Nothing but problems. Can you try Wheezy again?
Though I tried Wheezy, I will do it again. Also, followed the guide about the SPI-Setup, it is pretty straightforward.
Yup, I'm a sudo abuser, haha. I run almost everything with sudo, just to be sure.

If you could give me some advice on what to install and buy. I guess if I have everything you have, the LPD8806 should work for me as well. Initialy I thought LPD8806 is not compatible with the latest changes, but I guess it is.
I can't believe my strip is broken. Since it worked 2 weeks ago on my old setup, I doubt the fact that it is a coincidence, but I will buy another one.

Again, thanks for the support, Adam. You're truly a great guy!

Forum Jump:

Users browsing this thread: 1 Guest(s)