parent
e0a8552f26
commit
33b9d87bc6
6
main.py
6
main.py
|
@ -205,11 +205,11 @@ if __name__ == '__main__':
|
|||
client.publish("server-rack-led-1/power","True")
|
||||
client.publish("server-rack-led-1/mode","0")
|
||||
|
||||
# threading.Thread(target=lambda: client.loop_forever())
|
||||
# threading.Thread(target=lambda: client.loop_start())
|
||||
|
||||
try:
|
||||
client.loop_start()
|
||||
while True:
|
||||
client.loop_forever()
|
||||
if power == "True":
|
||||
if mode == 0:
|
||||
rainbowCycle(strip)
|
||||
|
@ -223,6 +223,6 @@ if __name__ == '__main__':
|
|||
time.sleep(1)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
client.disconnect()
|
||||
client.loop_stop()
|
||||
setColor(strip, Color(0,0,0))
|
||||
GPIO.cleanup()
|
||||
|
|
Loading…
Reference in New Issue