added power check to rainbow cycle

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-05-16 21:41:37 +02:00
parent e65c9b02b5
commit eeba48e52e
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ def rainbowCycle(strip, wait_ms=5, iterations=10):
for j in range(256*iterations):
if mode > 0:
break
elif power == "False":
break
for i in range(strip.numPixels()):
strip.setPixelColor(i, wheel((int(i * 256 / strip.numPixels()) + j) & 255))
strip.show()