Here are the code snippets referring to the servo motor.
#include <Servo.h>
Servo myservo;
int pos =0;
void setup() {
Serial.begin(9600);
myservo.attach(9);
}
void loop() {
myservo.write(180);
delay(1000);
myservo.write(90);
delay(1000);
}
Here are the code snippets referring to the servo motor.