#include <Servo.h>
int servoPIN=9;
int servoPOS=165;
Servo(Servo);
void setup() {
Serial.begin(9600);
Servo.attach(servoPIN);
}
void loop() {
Serial.println("input servo pos");
while (Serial.available()==0) {
}
servoPOS=Serial.parseInt();
Servo.write(servoPOS);
}
here is my code, im quite confused about this, everything seems fine and im following a youtube tutorial because im not familar with the commands for servos. on their end it works fine?
when i input the position i want my servo motor to go, it goes exactly there, then returns back to 0?