Hi there.
I have several apps written using the blinkstick nanos which are working perfectly, lovely and stable. But I’ve hit a couple of problems today and wonder if anyone has the solution.
If I run the code example below I get a seemingly random number of cycles then:
USBError(_str_error[ret], ret, _libusb_errno[ret]) usb.code.USBError: [Errno 32] Pipe error
I’ve tried putting in sleeps and moving things around but no joy. I hope someone can find the problem.
Many thanks.
#!/usr/bin/python
from blinkstick import blinkstick as bstick
import random as rnd
import time
def main():
while True:
for bl in bstick.find_all():
r=rnd.randint(0,255)
g=rnd.randint(0,255)
b=rnd.randint(0,255)
bl.pulse(red=r, green=g, blue=b, duration=500, steps=100)
main()