#include <ESP32Servo.h>
#include <Wire.h>
// RELACIONADO AO SERVOMOTOR
const int ServoPin =27;
Servo ServoMotor;
int posGraus = 0;
int pot = 34;
void setup()
{
Serial.begin(115200);
ServoMotor.attach (ServoPin);
}
void loop()
{
// RELACIONADO AO POTENCIOMETRO
int potvalue = analogRead(pot);
float x=map(potvalue,0,4095,0,180);
// RELACIONADO AO SERVOMOTOR
ServoMotor.write(x);
delay (20);
}