added mode

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-09-01 14:50:20 +02:00
parent e109e99891
commit 77c5ea3820
1 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def randomColor(strip):
strip.show()
time.sleep(1)
def ColorFadeIn(strip):
def colorFadeIn(strip):
color = Color(randint(0, 255), randint(0, 255), randint(0, 255))
for i in range(strip.numPixels()):
strip.setPixelColor(i, color)
@ -160,6 +160,8 @@ if __name__ == '__main__':
mode = 3
elif payload == "Random Color per LED":
mode = 4
elif payload == "Color fade-in":
mode = 5
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
strip.begin()
@ -206,6 +208,8 @@ if __name__ == '__main__':
randomColor(strip)
elif mode == 4:
randomColorPerLED(strip)
elif mode == 5:
colorFadeIn(strip)
else:
if singleExecute == True:
singleExecute = False