parent
cca4dbaf14
commit
e109e99891
8
main.py
8
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")
|
||||
|
|
Loading…
Reference in New Issue