#include <Servo.h>
#include <LiquidCrystal_I2C.h>
Servo myservo;
LiquidCrystal_I2C lcd(0x27, 16,2);
const int servo=10,
potentiometer=A0;
int pos=0;
void setup() {
myservo.attach(servo);
myservo.write(pos);
lcd.init();
lcd.backlight();
}
void loop() {
lcd.clear();
int value=analogRead(potentiometer);
pos=map(value,0,1023,0,180);
myservo.write(pos);
lcd.print(pos);
delay(20);
}