Hi all,
I saw several tutorial about controlling dc motor with opto encoder for controlling speed or distance but not both at the same time. I need to check encoder to be sure that the rover goes straight (both wheels at the same speed) controlling acceleration and distance. Is there sonething like accellstepper that also check two motors to move a rover with a programmed mouvement?
There are good encoder libraries, and many people have written code that measures both distance traveled and speed using wheel encoders. Examples can be found on line.
Hi Railroader, of corse. I know the topic you mentioned, I just aked for a library. I used in the past accelstepper that it's very easy to use: just set a speed, acceleration and distance to run and with just a line of code in the loop all the job it's done. The other lines in the loop (doing several things) are mine.
Such combined libraries don't exist. Use a library for the encoder. Then calculate the PWM for the motor and use a PID library to manage a certain speed.