#include <Wire.h> // I2C comm library
#include <LiquidCrystal_I2C.h> // I2C_LCD library
#define potPin A0
int ADCValue;
LiquidCrystal_I2C lcd(0x27, 20, 4); // LCD address 0x27 for a 20 char x 4 line display
void setup() {
lcd.init(); // Initialize the lcd
lcd.backlight(); // Turn On LCD backlight
pinMode(potPin, INPUT);
lcd.home();
lcd.print("Pot Value");
lcd.setCursor(0,1);
lcd.print("Reading : ");
}
void loop() {
ADCValue = analogRead(potPin);
lcd.setCursor(10,1);
lcd.print(ADCValue);
lcd.print(" ");
delay(10);
}