Hello
I have two continuous servo motors that I bought from Pololu and their speeds aren't syncing. I am using the Servo library with two SpringRC SM-S4303R Continuous Rotation Servos. I used the write() function to set the servos to the same speed, but when I upload the program one servo goes slightly faster than the other. This is not good, because I am trying to make a 2WD robot and I need it to drive in a straight line.
//Servo motor 2WD
#include <Servo.h>
// create 2 servo objects
Servo rservo;
Servo lservo;
void setup()
{
rservo.attach(9); // attach the right servo to pin 9
lservo.attach(10); // attach the left servo to pin 10
}
void loop()
{
//Set servos to full speed forward
rservo.write(75);
lservo.write(105);
}
Since this is a 2WD robot and the servos are facing away from each other, the number values for write() are different. They are both 15 above or below 90.