Quote:
|
Originally Posted by Zee
Hey guys, I have no clue how to do this. How do I convert the number of counts I receive from the encoder over a given time period to a corresponding PWM value?
Thanks
|
Well, what does the encoder count tell you? It can tell you how far you've gone. So, how do you convert that into a PWM value? Well, if you know that you want to go 3 feet, and your encoders tell you that you've only gone 2 feet, then you send your motors a value telling them to go forward. For a specific algorithm, I suggest using PID control. You can search these forums, or the
internet in general for an explanation of this.