I’m new to bibliopixel and have been trying to get some sample scripts going using the ws2801 led strip, but unfortunately everything I have tried so far is not working.
Maybe a little bit of help will get me going.
I started with a few demo commands such as (bp demo, bp demo list, and bp devices), but I could not get any led’s to light up.
I have been able to successfully get the Adafruit_ws2801 python plugin to work.
Import the WS2801 module.
import Adafruit_WS2801
import Adafruit_GPIO.SPI as SPI
Configure the count of pixels:
#PIXEL_COUNT = 150
#PIXEL_COUNT = 96
PIXEL_COUNT = 32
Alternatively specify a hardware SPI connection on /dev/spidev0.0:
SPI_PORT = 0
SPI_DEVICE = 0
pixels = Adafruit_WS2801.WS2801Pixels(PIXEL_COUNT, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE), gpio=GPIO)
So after a bit of reading on your site I found a script that should be closer to what I need to test the bibliopixel installation with the ws2801 led strip.
import bibliopixel
causes frame timing information to be output
bibliopixel.log.setLogLevel(bibliopixel.log.DEBUG)
Load driver for the AllPixel
from bibliopixel.drivers.serial import *
#from bibliopixel.drivers.SPI import SPI
set number of pixels & LED type here
driver = Serial(num = 10, ledtype = LEDTYPE.WS2801)
load the LEDStrip class
from bibliopixel.layout import *
led = Strip(driver)
load channel test animation
from bibliopixel.animation import StripChannelTest
anim = StripChannelTest(led)
try:
run the animation
anim.run()
except KeyboardInterrupt:
Ctrl+C will exit the animation and turn the LEDs offs
led.all_off()
led.update()
But unfortunately I get the following error when running the script:
python3 pixel.py
WARNING - deprecated - util.setLogLevel
Traceback (most recent call last):
File “pixel.py”, line 10, in
driver = Serial(num = 10, ledtype = LEDTYPE.WS2801)
File “/usr/local/lib/python3.6/site-packages/BiblioPixel-3.4.44-py3.6.egg/bibliopixel/drivers/serial/driver.py”, line 62, in init
resp = self._connect()
File “/usr/local/lib/python3.6/site-packages/BiblioPixel-3.4.44-py3.6.egg/bibliopixel/drivers/serial/driver.py”, line 88, in _connect
idv = self.devices.get_device(self.device_id)
File “/usr/local/lib/python3.6/site-packages/BiblioPixel-3.4.44-py3.6.egg/bibliopixel/drivers/serial/devices.py”, line 81, in get_device
raise ValueError(‘No default device for %s’ % self.hardware_id)
ValueError: No default device for 1D50:60AB
Any help would be appreciated.