Use hue and offset to calculate LED colour, so that we get a rainbow across all available LEDs that moves across the string.
This commit is contained in:
Lance Robson 2024-12-10 19:52:24 +00:00 committed by GitHub
parent 296dd34bc4
commit fbed06ec59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,6 @@ while True:
for i in range(NUM_LEDS):
hue = float(i) / NUM_LEDS
led_strip.set_hsv(i, offset, 1.0, 1.0)
led_strip.set_hsv(i, hue+offset, 1.0, 1.0)
time.sleep(1.0 / 60)