// Servo Sweep example for the ESP32
// https://wokwi.com/arduino/projects/323706614646309460
#include <ESP32Servo.h>
const int servoPin = 34;
Servo servo;
void a(){
servo.attach(servoPin, 500, 2400);
}
void setup() {
a();
}
int pos = 0;
void loop() {
for (pos = 0; pos <= 360; pos += 1) {
servo.write(pos);
delay(15);
}
for (pos = 360; pos >= 0; pos -= 1) {
servo.write(pos);
delay(15);
}
}