added update debug

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 14:52:53 +01:00
parent dbb527400f
commit 4b694a93b2
1 changed files with 3 additions and 1 deletions

View File

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