// Servo motor in Arduino
#include <Servo.h>
int servopin = 9;
// int servopos = 60;
int servopos;
Servo myServo; // myServo is object
// here we create object
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
myServo.attach(servopin);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("What Angle for the Servo");
while(Serial.available()==0)
{
}
servopos=Serial.parseInt();
myServo.write(servopos);
}