You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error encountered when trying to control BlinkStrip using Python 3 on Windows.
#Import blinkstick module
from blinkstick import blinkstick
#Find the first BlinkStick
bstick = blinkstick.find_first()
#Set the color red on the 12th LED of R channel
bstick.set_color(channel=0, index=12, name="red")
TypeError Traceback (most recent call last)
<ipython-input-91-73997141703b> in <module>
6
7 #Set the color red on the 12th LED of R channel
----> 8 bstick.set_color(channel=0, index=12, name="red")
E:\Anaconda3\lib\site-packages\blinkstick\blinkstick.py in set_color(self, channel, index, red, green, blue, name, hex)
339
340 if self.error_reporting:
--> 341 self._usb_ctrl_transfer(0x20, 0x9, report_id, 0, control_string)
342 else:
343 try:
E:\Anaconda3\lib\site-packages\blinkstick\blinkstick.py in _usb_ctrl_transfer(self, bmRequestType, bRequest, wValue, wIndex, data_or_wLength)
224 if sys.platform == "win32":
225 if bmRequestType == 0x20:
--> 226 data = (c_ubyte * len(data_or_wLength))(*[c_ubyte(ord(c)) for c in data_or_wLength])
227 data[0] = wValue
228 if not self.device.send_feature_report(data):
E:\Anaconda3\lib\site-packages\blinkstick\blinkstick.py in <listcomp>(.0)
224 if sys.platform == "win32":
225 if bmRequestType == 0x20:
--> 226 data = (c_ubyte * len(data_or_wLength))(*[c_ubyte(ord(c)) for c in data_or_wLength])
227 data[0] = wValue
228 if not self.device.send_feature_report(data):
TypeError: ord() expected string of length 1, but int found
The text was updated successfully, but these errors were encountered:
Error encountered when trying to control BlinkStrip using Python 3 on Windows.
The text was updated successfully, but these errors were encountered: