Ok, so 2 of my 3 servos are now working beautifully (not entirely sure what I did). However the last servo (servoBase) is still driving into its leftmost stop, regardless of what its being told to do. When the code is running, if you grab the servo and manually turn it to the right, it will try to drive back to the left. Here is the code I am using.
#include <Servo.h>
Servo servoBase;
Servo servoLowerarm;
Servo servoUp;
void setup()
{
servoBase.attach(9); // attaches the servo on pin 9 to the servo object
servoLowerarm.attach(13);
servoUp.attach(11);
}
void loop()
{
servoBase.write(170); //0 left
servoUp.write(180); //180 all up lowest servo
servoLowerarm.write(180); //180 all up higherservo
delay(2000);
servoBase.write(120);
delay(1000);
servoUp.write(125);
delay(900);
servoBase.write(180);
servoUp.write(120);
servoLowerarm.write(180);
delay(3000);
servoUp.write(180);
delay(1000);
servoLowerarm.write(90);
delay(2000);
}
The servo is a HItec HS-422 and it does work fine on other programs. I have tried changing the angle and the pin it is assigned to, but so far nothing has worked. I have no Idea what is wrong. I am new at this and may simply be over looking a simple error.
Thanks