Hey everybody,
i started some nice “knightrider” python script on a raspi with a BlinkStick Strip.
counter = 0
direction = 1
while True:
for bstick in blicks:
bstick.set_color(channel=0, index=counter, name="black")
time.sleep(0.003) #<----- You need to add this to wait for black color to be sent to the LEDs
counter = counter+direction
if counter == 7:
direction = -1
if counter == 0:
direction = 1
for bstick in blicks:
bstick.set_color(channel=0, index=counter, name="green")
time.sleep(0.2)
But after 1 min it crashed.
pi@raspberrypi:~/boot $ sudo python Blinkstick.py Knightrider
Traceback (most recent call last):
File "Blinkstick.py", line 59, in <module>
bstick.set_color(channel=0, index=counter, name="black")
File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 341, in set_color
self._usb_ctrl_transfer(0x20, 0x9, report_id, 0, control_string)
File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 244, in _usb_ctrl_transfer
return self.device.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength)
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 711, in ctrl_transfer
self.__get_timeout(timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 836, in ctrl_transfer
timeout))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 571, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error
Is this a code problem or some libUsb deep …