#include "ESP32Servo.h"
Servo servo;
int Grados = 0;
int Poti = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
ESP32PWM::allocateTimer(0);
servo.attach(4);
}
void loop() {
// put your main code here, to run repeatedly:
Poti = analogRead(13);
Grados = map(Poti,0,4095,0,180);
servo.write(Grados);
delay(100);
}