Yes that's one way, changing the increment in the value written to the PWM pin. If you actually ran that code it would be too fast so you would have to put a delay in it. Therefore instead of changing the increment you could change the delay. Or you could do both if you could get your head round it. ![]()