diff --git a/main.py b/main.py index 5f04722..c61c1da 100644 --- a/main.py +++ b/main.py @@ -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