testing other range methode

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-20 17:40:44 +01:00
parent b32724eccb
commit 4b6eaead5c
1 changed files with 6 additions and 6 deletions

View File

@ -78,22 +78,22 @@ if __name__ == "__main__":
mqttc.loop_start() mqttc.loop_start()
while True: while True:
try: try:
for pixel in range(LEDS_PER_PIXEL): for pixel in range(5):
update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL, LEDS_PER_PIXEL*2): for pixel in range(5, 10):
update_led_strip(tuple(eval(rgb_values_list[1])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[1])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL*2, LEDS_PER_PIXEL*3): for pixel in range(10, 15):
update_led_strip(tuple(eval(rgb_values_list[2])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[2])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL*3, LEDS_PER_PIXEL*4): for pixel in range(15, 20):
update_led_strip(tuple(eval(rgb_values_list[3])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[3])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL*4, LEDS_PER_PIXEL*5): for pixel in range(20, 25):
update_led_strip(tuple(eval(rgb_values_list[4])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[4])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6): for pixel in range(25, 30):
update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip) update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip)
except KeyboardInterrupt: except KeyboardInterrupt:
for led in range(LED_COUNT): for led in range(LED_COUNT):