#include <ESP32Servo.h>

#define SERVO_PIN 2

Servo myServo;

void setup() {
  myServo.attach(SERVO_PIN);   // Attach servo to GPIO 2
}

void loop() {
  myServo.write(90);           // Move to 90 degrees
  delay(2000);                 // Wait for 2 seconds

  myServo.write(0);            // Move back to 0 degrees
  delay(2000);                 // Wait before repeating
}
