I’m trying to get an old LED strip that uses TM1804 working on Raspberry PI model 1.
I enabled SPI via:
I installed BiblioPixel via:
sudo pip3 install BiblioPixel (NOTE: This took a very long time to install/compile – 1.5 hours)
sudo pip3 install pyserial --upgrade
sudo pip3 install spidev
I am trying to run a simple test program. I’m not sure the program is correct. In the end, I’m just trying to get a few LEDs to light. I have PIN 19 (MOSI) connected to the data line of the LED stip.
causes frame timing information to be output
Load driver for the AllPixel
from bibliopixel.drivers.SPI import *
from bibliopixel.drivers.driver_base import *
set number of pixels & LED type here
driver = Serial(num = 10, ledtype = LEDTYPE.TM1804, device_id = 2)
driver = SPI(ledtype = LEDTYPE.TM1804, num = 10, dev=’/dev/spidev0.0’, interface=‘FILE’, spi_speed=1, c_order = ChannelOrder.RGB, gamma = bibliopixel.gamma.DEFAULT)
load the LEDStrip class
from bibliopixel.layout import *
led = Strip(driver)
load channel test animation
from bibliopixel.animation import StripChannelTest
anim = StripChannelTest(led)
run the animation
Ctrl+C will exit the animation and turn the LEDs offs
When I run this via:
I get this:
ValueError: 5 is not a valid LED type.
Did I miss installing something? Does my sample program look OK?