From 09efb339ac71da08146d0752f8dea12b2c1cfd6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 17 Feb 2024 14:16:31 +0100 Subject: [PATCH] strip show at on message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- client/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/main.py b/client/main.py index 902ed1f..1d0cc02 100644 --- a/client/main.py +++ b/client/main.py @@ -26,8 +26,7 @@ LEDS_PER_PIXEL = 5 # Global variables for LED strip control global strip -strip = neopixel.NeoPixel(pin = board.D18, n = LED_COUNT, auto_write = True, pixel_order = neopixel.RGB) -strip.auto_write = True +strip = neopixel.NeoPixel(pin = board.D18, n = LED_COUNT, auto_write = False, pixel_order = neopixel.RGB) def register_tube(): # Register or reauthenticate the tube with the server @@ -84,6 +83,8 @@ def on_message(mqttc, obj, msg): for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6): update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip) + + strip.show() time.sleep(1) if __name__ == "__main__":