kopia lustrzana https://github.com/pimoroni/pimoroni-pico
linting examples
rodzic
1c1cf528f9
commit
2aace8cac9
|
@ -36,10 +36,10 @@ while True:
|
||||||
else:
|
else:
|
||||||
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
|
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
|
||||||
time.sleep(SPEED)
|
time.sleep(SPEED)
|
||||||
|
|
||||||
for i in range(NUM_LEDS):
|
for i in range(NUM_LEDS):
|
||||||
if (i % 2) == 0:
|
if (i % 2) == 0:
|
||||||
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
|
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
|
||||||
else:
|
else:
|
||||||
led_strip.set_hsv(i, HUE_1 / 360, 1.0, BRIGHTNESS)
|
led_strip.set_hsv(i, HUE_1 / 360, 1.0, BRIGHTNESS)
|
||||||
time.sleep(SPEED)
|
time.sleep(SPEED)
|
||||||
|
|
|
@ -39,4 +39,4 @@ while True:
|
||||||
# ...and then update one random pixel at a time to keep things fresh and sparkly.
|
# ...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.
|
# 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))
|
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)
|
||||||
|
|
Ładowanie…
Reference in New Issue