Closed XFactHD closed 4 years ago
What hardware are you using to provide a SPI port on the Windows machine?
I am using an Adafruit FT232H Breakout board.
Thanks. That should be fine.
I think this might be related to changes in the NeoPixel library related to pixelbuf. I just tested on a Pi and recreated the issue:
(neopixel_spi) pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> import neopixel_spi as neopixel
>>> pixels = neopixel.NeoPixel_SPI(board.SPI(), 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/neopixel_spi/lib/python3.7/site-packages/neopixel_spi.py", line 117, in __init__
self.buf = bytearray(self.n * self.bpp)
AttributeError: can't set attribute
>>>
Thanks for pointing this out. Investigating...
Please try the 0.3.2 release: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/releases/tag/0.3.2
I will test it later and come back to you with the results.
I have now tested the fix, works as intended now. Thanks for the quick fix.
One thing I discovered while testing is that RGBW pixels can not be controlled with the library, attempting to pass a 4 Byte value as a color throws a ValueError. Should I create another issue for that or do you want to handle that here? I will update this issue or a new one with the error message as soon as I am back at my PC.
Cool. Glad that fixed it. Let's close this one.
For the ValueError issue, try using a tuple instead of a 32bit value. See here: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/issues/50
Okay, thanks for the hint, I will try that.
When trying to run the NeoPixel_SPI example in Python 3.6.4 on Windows 10 I get the following error:
The code (slightly modified):
The versions of the libraries I am using:
I currently cannot test any further on another PC or CircuitPython powered MCU.