Not exactly - you're dividing it by four to get something in the PWM range - 0-255. For my suggestion, you can keep a variable in that PWM range and forget the division. Make sure you ensure that it is in that range though.
Not exactly - you're dividing it by four to get something in the PWM range - 0-255. For my suggestion, you can keep a variable in that PWM range and forget the division. Make sure you ensure that it is in that range though.