parent
b4568e3e51
commit
7fae147f14
|
@ -77,20 +77,24 @@ if __name__ == "__main__":
|
|||
|
||||
mqttc.loop_start()
|
||||
while True:
|
||||
for pixel in range(LEDS_PER_PIXEL):
|
||||
update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip)
|
||||
try:
|
||||
for pixel in range(LEDS_PER_PIXEL):
|
||||
update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL, LEDS_PER_PIXEL*2):
|
||||
update_led_strip(tuple(eval(rgb_values_list[1])), pixel, strip)
|
||||
for pixel in range(LEDS_PER_PIXEL, LEDS_PER_PIXEL*2):
|
||||
update_led_strip(tuple(eval(rgb_values_list[1])), pixel, strip)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL*2, LEDS_PER_PIXEL*3):
|
||||
update_led_strip(tuple(eval(rgb_values_list[2])), pixel, strip)
|
||||
for pixel in range(LEDS_PER_PIXEL*2, LEDS_PER_PIXEL*3):
|
||||
update_led_strip(tuple(eval(rgb_values_list[2])), pixel, strip)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL*3, LEDS_PER_PIXEL*4):
|
||||
update_led_strip(tuple(eval(rgb_values_list[3])), pixel, strip)
|
||||
for pixel in range(LEDS_PER_PIXEL*3, LEDS_PER_PIXEL*4):
|
||||
update_led_strip(tuple(eval(rgb_values_list[3])), pixel, strip)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL*4, LEDS_PER_PIXEL*5):
|
||||
update_led_strip(tuple(eval(rgb_values_list[4])), pixel, strip)
|
||||
for pixel in range(LEDS_PER_PIXEL*4, LEDS_PER_PIXEL*5):
|
||||
update_led_strip(tuple(eval(rgb_values_list[4])), pixel, strip)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6):
|
||||
update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip)
|
||||
for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6):
|
||||
update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip)
|
||||
except KeyboardInterrupt:
|
||||
for led in LED_COUNT:
|
||||
update_led_strip((0, 0, 0), led, strip)
|
Loading…
Reference in New Issue