Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry PI ws2801 TypeError #374

Closed
DerDorfbewohner opened this issue Mar 4, 2023 · 1 comment
Closed

Raspberry PI ws2801 TypeError #374

DerDorfbewohner opened this issue Mar 4, 2023 · 1 comment

Comments

@DerDorfbewohner
Copy link

Hello,
I used issue #123 to modify the project to work with the ws2801 led stip.
When I run visualization.py I get this error:

Traceback (most recent call last): File "/home/pi/audio-reactive-led-strip/python/visualization.py", line 354, in <module> led.update() File "/home/pi/audio-reactive-led-strip/python/led.py", line 156, in update _update_pi() File "/home/pi/audio-reactive-led-strip/python/led.py", line 122, in _update_pi strip.show() File "/usr/local/lib/python3.9/dist-packages/Adafruit_WS2801/WS2801.py", line 73, in show self._spi.write(self._pixels) File "/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/SPI.py", line 82, in write self._device.writebytes(data) TypeError: Non-Int/Long value in arguments: b4dd2bf0.

@DerDorfbewohner
Copy link
Author

I found a fix:
In led.py
Replace:
strip.set_pixel(i, Adafruit_WS2801.RGB_to_color( r[i], g[i], b[i] ))
with
strip.set_pixel(i, Adafruit_WS2801.RGB_to_color( int(r[i]), int(g[i]), int(b[i]) ))

This is line 120.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant