See the StateChangeDetection example, how to react on button state changes only. Whenever the button state changes, start or stop the PWM output.
See the StateChangeDetection example, how to react on button state changes only. Whenever the button state changes, start or stop the PWM output.