Hi, I started to play with the Blinkstick Nano in Python. I wonder if the API is not compatible to Python3.x, because I can’t use most of the methods.
This is my code:
from blinkstick import blinkstick
for bs in blinkstick.find_all():
bs.set_random_color()
And this is the error I get:
Traceback (most recent call last):
File “.\test.py”, line 4, in
bs.set_random_color()
File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 627, in set_random_color
self.set_color(name=“random”)
File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 341, in set_color
self._usb_ctrl_transfer(0x20, 0x9, report_id, 0, control_string)
File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 226, in _usb_ctrl_transfer
data = (c_ubyte * len(data_or_wLength))([c_ubyte(ord©) for c in data_or_wLength])
File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 226, in
data = (c_ubyte * len(data_or_wLength))([c_ubyte(ord©) for c in data_or_wLength])
TypeError: ord() expected string of length 1, but int found
Any idea?