From 73a0f3c799b6fee3c32667565cfdeae3f8a584d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 17 Feb 2024 14:08:07 +0100 Subject: [PATCH] added debugger at pixel updater MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- client/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.py b/client/main.py index 931600f..7529e1c 100644 --- a/client/main.py +++ b/client/main.py @@ -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):