Please post this in the general section, the “ask the experts” section forces us to not be able to post. Or at least make a separate thread a lot of times regular members can provide invaluable information.
First I would make sure that there are no delays before turning off the motor in your code I did this for a wii remote controlled vex robot with a .25 second delay by accident and every time you stopped the robot it would continue turning right for about 2 or 3 inches, doing this over and over eventually adds up to a full turn. Sometimes the code mistake won’t stand out so take a good look at it.
If the code is fine then try a different motor (if you switch micro controllers that shouldn’t be the problem). Load the code and just reverse the motor connections, what I mean is hook up the working motor to the port that the non working motor is on and hook up the non working motor to the port the working motor was on.
If the same motor still exhibits the same symptoms on the other port then I would say that it is a bad motor. If the good motor starts exhibiting symptoms on the bad port connection to the micro controller then it’s either a micro controller problem (not likely as you tried 2 different ones) or more than likely a coding error.
You could also try
loading the default code onto the micro controller and use the radio control to verify that it is the motor that is bad or the mcu. If it works fine then try loading some simple autonomous code like run one motor for a second and shut that off then run another in a loop. This will show that the autonomous code can run the motor without problems. If both of these test’s work then it is not a hardware issue, its a coding issue.
After reading your post a bit more carefully I saw that you changed both motors which now makes me highly doubt its a motor issue, and since you changed the micro controller it makes me really doubt that hardware is an issure in this case. I have a deep suspicion that somewhere is your code you mixed up a motor, added an extra delay, messed up a variable, turned it off to late ect… I’m not trying to say your code is bad we all make mistakes, like that problem with the wii remote robot with the delay I had caused me a good deal of frustration. I thought it was a compatibility issue with the arduino but it turned out to be a delay(250); line of code in the program. Sucks because I have two youtube videos up showing the robot and if you look closely you can see it move slightly every time!