added debugger at pixel updater

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 14:08:07 +01:00
parent 0f8c300a32
commit 73a0f3c799
1 changed files with 2 additions and 2 deletions

View File

@ -59,14 +59,14 @@ def is_connected_to_wifi():
return output.split('"')[1]
def update_led_strip(rgb_values, pixel, strip):
print(pixel)
print(rgb_values)
strip[int(pixel)] = rgb_values
def on_message(mqttc, obj, msg):
rgb_values_list = eval(msg.payload.decode())
for pixel in range(LEDS_PER_PIXEL):
print("Updating pixel "+str(pixel)+" with values: ")
print(tuple(eval(rgb_values_list[0])))
update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip)
for pixel in range(LEDS_PER_PIXEL, LEDS_PER_PIXEL*2):