added new effect

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-09-01 14:49:09 +02:00
parent cca4dbaf14
commit e109e99891
1 changed files with 8 additions and 0 deletions

View File

@ -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")