guild icon
Toit
#PWM generator start seems to cause LED to flicker once?
Thread channel in help
addshore
addshore 09/23/2025 04:08 PM
We have some code such as this

for i := 0; i < 3; i++: leds[i] = gpio.Pin pins[i] --output=true --value=1 sleep --ms=1000 for i := 0; i < 3; i++: channels[i] = generator.start leds[i] --duty-factor=1 sleep --ms=1000 sleep --ms=10000

Where we control an RGB LED.
First looping to setup the pins, with value 1 which in this case is LED OFF
We then look through to start the generators, and calling .start seems to cause a small flicker once for each color.

Is there a way to avoid this / a bug that can be fixed?
1 messages in total