To be clear: I absolutely love this API.
But there is one slight problem when using it: Every time you change colors, you have to wait about a second before colors change, which makes it impossible to react quickly to events like keystrokes.
But I was able to find the issue and fix it:
Go to the create_command function and remove the line strips = [0, strips_info(ser, 1)-1, strips_info(ser, 2)-1]
Go to the init function and add the following code at the very top:
if not "INITED" in globals():
global INITED
INITED = False
if INITED:
return
global strips
strips = [0, strips_info(ser, 1)-1, strips_info(ser, 2)-1]```
This stops a pretty time-intensive initialization from being called every time you change the LEDs and instead only calls it once
To be clear: I absolutely love this API. But there is one slight problem when using it: Every time you change colors, you have to wait about a second before colors change, which makes it impossible to react quickly to events like keystrokes.
But I was able to find the issue and fix it:
create_command
function and remove the linestrips = [0, strips_info(ser, 1)-1, strips_info(ser, 2)-1]
init
function and add the following code at the very top: