jodicalhon
New Member
I have a small two-wheeled robot using differential drive. I've fitted wheel encoders and I'm pretty sure (famous last words!) that I can implement some sort of speed control by counting clicks/time on one motor, then clicks/time on the other, and vary a PWM source to independently control each motor's speed.
If I also want to calculate the total distance travelled by the bot, and its postion in cartesian space, I would have to count total clicks on wheel A and total clicks on wheel B, wouldn't I? (And do some calculating!)
I can only think that I would have to swap between wheels as I count, and would likely end up with inaccurate counts.
Am I right? Am I missing something? Is the answer right in front of me? What is the best way to go about this sort of thing?
Any help appreciated.
Jo
If I also want to calculate the total distance travelled by the bot, and its postion in cartesian space, I would have to count total clicks on wheel A and total clicks on wheel B, wouldn't I? (And do some calculating!)
I can only think that I would have to swap between wheels as I count, and would likely end up with inaccurate counts.
Am I right? Am I missing something? Is the answer right in front of me? What is the best way to go about this sort of thing?
Any help appreciated.
Jo