JohnMarzulli / categorical-sectional

Version of the light-up-map that works with "individually addressable" string lights based on the WS2801.
28 stars 17 forks source link

Key Error : 'WS2801' #36

Closed CJGoush closed 10 months ago

CJGoush commented 4 years ago

John, every time I go to run the check_lights_wiring file I get this error message. "Key Error: 'WS2801'. I have checked the soldering connections to my LED's and I am sure they are correct. However, it does not seem that the RasPi is communicated with the lights. Any ideas as to solving this?

benshaw5 commented 3 years ago

CJGoush, I ran into the same error last night. I'm not a raspberry pi or python expert by any stretch of the imagination, but I did manage to figure out the pi was having trouble with the SPI bus. I had the SPI enabled per John's instructions but, perhaps due to different variants of the pi OS, I found I needed to install python SPI wrapper to make it work. Once I installed the SPI wrapper the check_lights_wiring started working. The steps I used are below and the link I found it is at the bottom.

Step 3 – Install Python SPI Wrapper In order to read data from the SPI bus in Python we need some additional libraries. These may already be installed but you can check using :

sudo apt-get install -y python-dev python3-dev

and :

sudo apt-get install -y python-spidev python3-spidev

Then to finish we can download ‘py-spidev’ and compile it ready for use :

cd ~
git clone https://github.com/Gadgetoid/py-spidev.git
cd py-spidev
sudo python setup.py install
sudo python3 setup.py install
cd ~

Link to the SPI interface tutorial

JohnMarzulli commented 3 years ago

Thank you for the update!