From e109e99891b91437a4f2d85010bc8e5f936d24a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Thu, 1 Sep 2022 14:49:09 +0200 Subject: [PATCH] added new effect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.py b/main.py index 172ed53..5f04722 100644 --- a/main.py +++ b/main.py @@ -111,6 +111,14 @@ def randomColor(strip): strip.show() time.sleep(1) +def ColorFadeIn(strip): + color = Color(randint(0, 255), randint(0, 255), randint(0, 255)) + for i in range(strip.numPixels()): + strip.setPixelColor(i, color) + strip.show() + time.sleep(float(0.01)) + time.sleep(1) + def mqtt_on_connect(client, userdata, flags, rc): client.subscribe("server-rack-led/power") client.subscribe("server-rack-led/mode")