And this should be: servoLeft.write(pos); // tell servo to go to position in variable 'pos' servoRight.write(pos);