#include <ESP32Servo.h>
Servo servo1;
Servo servo2;
unsigned char estado = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
servo1.attach(32);
servo2.attach(33);
}
unsigned int pot1, pot2;
void loop() {
pot1 = analogRead(4);
pot2 = analogRead(2);
servo1.write(map(pot1, 0, 4095, 0, 180));
servo2.write(map(pot2, 0, 4095, 0, 180));
Serial.print("Pot1:");
Serial.println(pot1);
Serial.print("Pot2:");
Serial.println(pot2);
//delay(1000);
}