linting examples

This commit is contained in:
helgibbons 2021-12-05 19:57:38 +00:00
parent 1c1cf528f9
commit 2aace8cac9
2 changed files with 3 additions and 3 deletions

View File

@ -36,10 +36,10 @@ while True:
else:
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
time.sleep(SPEED)
for i in range(NUM_LEDS):
if (i % 2) == 0:
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
else:
led_strip.set_hsv(i, HUE_1 / 360, 1.0, BRIGHTNESS)
time.sleep(SPEED)
time.sleep(SPEED)

View File

@ -39,4 +39,4 @@ while True:
# ...and then update one random pixel at a time to keep things fresh and sparkly.
# Comment out the lines below if you want static lights.
led_strip.set_hsv(randrange(0, NUM_LEDS), randrange(HUE_START, HUE_END) / 360, 1.0, uniform(BRIGHTNESS_MIN, BRIGHTNESS_MAX))
time.sleep(SPEED)
time.sleep(SPEED)