|
|
@ -7,7 +7,9 @@ def set_all_leds(device, grb=[0,0,0]):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Takes a GRB color array as input and sets the color on all LEDs.
|
|
|
|
Takes a GRB color array as input and sets the color on all LEDs.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
return device.set_led_data(0, grb*32)
|
|
|
|
return_value = device.set_led_data(0, grb*32)
|
|
|
|
|
|
|
|
sleep(0.02) # minimal delay to not crash the blinkstick
|
|
|
|
|
|
|
|
return return_value
|
|
|
|
def morph_color(color, steps):
|
|
|
|
def morph_color(color, steps):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Takes an int between 0-255 and either increments or decreases it by the specified steps.
|
|
|
|
Takes an int between 0-255 and either increments or decreases it by the specified steps.
|
|
|
@ -55,6 +57,5 @@ grb = [
|
|
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
while True:
|
|
|
|
set_all_leds(device, grb)
|
|
|
|
set_all_leds(device, grb)
|
|
|
|
sleep(0.02) # minimal delay to not crash the blinkstick
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
grb = morph_grb(grb, 2)
|
|
|
|
grb = morph_grb(grb, 2)
|
|
|
|