#include <ESP32Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd (0x27, 16, 2 );
int pot=12;
int angulo;
int giro;
Servo steve;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  steve.attach(14);
  pinMode(12,INPUT);
  lcd.init();
  lcd.backlight();
  lcd.print("grado: ");
}
void loop() {
  // put your main code here, to run repeatedly:
  angulo=analogRead(pot);
giro = map(angulo, 0, 4095, 0, 180);
 steve.write(giro);
 lcd.print(giro);
 lcd.setCursor(1,1);
 delay(10);
}