#include <Servo.h>
Servo myservo;
#define POTENCIOMETRO_CIRCULAR 34
#define servo 13
int POT1=0;
int grados;
void setup() {
pinMode(POTENCIOMETRO_CIRCULAR, INPUT);
myservo.attach(servo);
// put your setup code here, to run once:
Serial.begin(115200);
//Serial.println("Hello, ESP32!");
}
void loop() {
POT1 = analogRead(POTENCIOMETRO_CIRCULAR);
grados = map(POT1,0,4095,0,180);
Serial.print("Grados: ");
Serial.println(grados);
myservo.write(grados);
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}