changed loop methode

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-01 22:46:56 +02:00
parent e0a8552f26
commit 33b9d87bc6
1 changed files with 3 additions and 3 deletions

View File

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