#include <ESP32Servo.h>

Servo myServo;

void setup() {
  myServo.attach(33, 500, 2400);
}

void loop() {
  myServo.write(0);
  delay(500);
  myServo.write(180);
  delay(500);
}