#include <ESP32Servo.h>
//cambié la libreria del servo, por la del esp32
Servo servo;
int boton_A = 0;
int boton_B = 0;
void setup(){
servo.attach(13);
pinMode(4, INPUT);
pinMode(2, INPUT);
servo.write(0);
}
void loop(){
boton_A = digitalRead(4);
boton_B = digitalRead(2);
if (boton_A == HIGH && boton_B == LOW) {
servo.write(90);
delay(3000);
}
if (boton_B == HIGH && boton_A == LOW) {
servo.write(180);
delay(3000);
}
else{
servo.write(0);
}
}