From fbed06ec592a4ebd9a465d9718e05491abe7f16c Mon Sep 17 00:00:00 2001 From: Lance Robson Date: Tue, 10 Dec 2024 19:52:24 +0000 Subject: [PATCH] Use hue Use hue and offset to calculate LED colour, so that we get a rainbow across all available LEDs that moves across the string. --- micropython/examples/plasma_2350/rainbow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/examples/plasma_2350/rainbow.py b/micropython/examples/plasma_2350/rainbow.py index d1d7c11..6084a16 100644 --- a/micropython/examples/plasma_2350/rainbow.py +++ b/micropython/examples/plasma_2350/rainbow.py @@ -22,6 +22,6 @@ 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)