|
Re: Encoder Counts/time period to PWM value
what you could try instead is if you wanted to use PID to make the PWMs function on a more linear scale, measure your top speed (when the PWM is set to 254) and then take any speed, divide it by the top speed, and multiply by 254 - this becomes your "actual" pwm. that way, the PID loop would result in the PWM control being more linear.
|