// Controlling servo motor : Moving by one position to another without Loop
#include <Servo.h>

Servo myServo;

int pos = 0;

void setup() {
  myServo.attach(10);
}

void loop() {
  myServo.write(85);
  delay(500);

  myServo.write(20);
  delay(500);

  myServo.write(170);
  delay(500);
}