#include<ESP32Servo.h>
Servo servo1;
Servo servo2;
int PINSERVO = 22;
int PINSERVO2 = 23;
int PULSOMIN=500;
int PULSOMAX=2450;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
//DATOS DEL SERVO
servo1.attach(PINSERVO,PULSOMIN,PULSOMAX);
servo2.attach(PINSERVO2,PULSOMIN,PULSOMAX);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
servo1.write(0);
servo2.write(180);
delay(1500);
servo1.write(180);
servo2.write(0);
delay(1500);
}