From 77c5ea3820592ecd2b9ba8f71bfa8627ca883d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Thu, 1 Sep 2022 14:50:20 +0200 Subject: [PATCH] added mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 5f04722..c61c1da 100644 --- a/main.py +++ b/main.py @@ -111,7 +111,7 @@ def randomColor(strip): strip.show() time.sleep(1) -def ColorFadeIn(strip): +def colorFadeIn(strip): color = Color(randint(0, 255), randint(0, 255), randint(0, 255)) for i in range(strip.numPixels()): strip.setPixelColor(i, color) @@ -160,6 +160,8 @@ if __name__ == '__main__': mode = 3 elif payload == "Random Color per LED": mode = 4 + elif payload == "Color fade-in": + mode = 5 strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL) strip.begin() @@ -206,6 +208,8 @@ if __name__ == '__main__': randomColor(strip) elif mode == 4: randomColorPerLED(strip) + elif mode == 5: + colorFadeIn(strip) else: if singleExecute == True: singleExecute = False