I agree with the comment by Tards57. I haveave been modifying the drive of the mbot to use steppers (the cheap unipolar ones) for the drive motors. It’s critical that both motors run at the same time, and most stepper routines wait for one motor to get to its final position before moving on to the next stepper command to move the other motor.
There are great utube videos about running the two motors simultaneously. Basically you move each motor 1 step at a time, one right after the other, and then put that in a loop like Tards57 suggests and stay in the loop until the end position (168 in his example). You can use his myservo1.write(amount) command setting amount to 1, but its a faster loop if you find a command in the arduino software that moves a single step. onestep() does it in some software, but you probably need to look in the makeblock .cpp file for steppers to find what makeblock is using. Also, in the utube videos, it turns out to be important to put in a short delay in the loop so that the motors have a chance to make the one step before the next one. Something like this:
int servo_pos = 0;
While servo-pos<300 { //the final target position
myservo1.onestep()
myservo2.onestep()
servo_pos++ //increment by +1
delayMicroseconds (1000) //wait a ms for the steps to be made. Try to make this as small as possible
}
endWhile
It’s also possible there is a simpler solution, because Dave-Dillon says sometimes it works and sometimes only one servo runs. For my steppers, this occurs if the power is too low. The steppers need more voltage than the arduino often supplies. Can the stepper drivers be powered with Vin rather than +5V? I even run 8volts to my stepper drivers and only 3.7 or 5 to the arduino. Not sure how makeblock configures its stepper drivers. But at 8 volts, the action is very brisk - torque is betterI h