I have written a code that generates PWM to control LED. Duty cycle is from 0 to 100% (0 = lowest, 100 = highest).
I am using serial monitor to input any number from 0 to 100.
Every time I input a number. For example: if I input 50, serial monitor would read 50, then it would change to 0 as you can see below. How can I prevent this from changing.