I try to run multistrandtest.py on a Pi, trying to use both PWM Channels. The Error that comes up:
Press Ctrl-C to quit.
Traceback (most recent call last):
File "multistrandtest.py", line 84, in <module>
multiColorWipe(Color(255, 255, 0), Color(0, 255, 255)) # Composite White wipe
File "multistrandtest.py", line 41, in multiColorWipe
strip2.setPixelColor(i / 2, color2)
File "/usr/local/lib/python3.7/dist-packages/rpi_ws281x/rpi_ws281x.py", line 144, in setPixelColor
self._led_data[n] = color
File "/usr/local/lib/python3.7/dist-packages/rpi_ws281x/rpi_ws281x.py", line 55, in __setitem__
return ws.ws2811_led_set(self.channel, pos, value)
TypeError: in method 'ws2811_led_set', argument 2 of type 'int'
When looking at this second argument pos I can see its going crazy on the second Loop (8 pixel lenght):
Hello,
I try to run
multistrandtest.py
on a Pi, trying to use both PWM Channels. The Error that comes up:When looking at this second argument
pos
I can see its going crazy on the second Loop (8 pixel lenght):The example is passing a float as position on this line: https://github.com/rpi-ws281x/rpi-ws281x-python/blob/master/examples/multistrandtest.py#L39 I guess the intent was to adjust for different lengths of strips? For me its just crashing, no matter the lengths are equal or not. A quick fix would be a int typecast.