
//pins 12,5 for servo motors
int servo1 = 12;
int servo2 = 5;

int count;

void setup() {
  pinMode(servo1, OUTPUT);
  pinMode(servo2, OUTPUT);
}


void loop() {

  //USE PWM TO CONTROL SERVO MOTOR- set at 150
  analogWrite(servo2, 150);
  delay(2000);
  analogWrite(servo2, 200);
  delay(2000);
  analogWrite(servo2, 240);
  delay(2000);

  //MANUALLY CONTROL SERVO MOTOR
  while(1) {
    digitalWrite(servo1, 1);
    delayMicroseconds(875); // half of 1750
    digitalWrite(servo1, 0);
    delayMicroseconds(125); // half of 250
  }



}