Naga the solution is under your eyes. With the present code you can press the switches for all your life but the duty cycle of your pwm out will remain always 25! Why we are making the variable VDuty moving from 0 to 255. Why I told you to change B0 to 25 if you want to scan the whole range with 10 steps ?
Al.
Bookmarks