//sketch.ino
#include <Servo.h>
Servo myservo; // Create a servo object to control a servo motor
void setup() {
Serial.begin(9600);
myservo.attach(9); // Attach the servo to pin 9
}
void loop() {
Serial.println("90");
myservo.write(90); // Set the servo to 90 degrees
delay(1000);
Serial.println("0"); // Wait for 1 second
myservo.write(0); // Set the servo to 0 degrees
delay(1000); // Wait for 1 second
}