#include <LiquidCrystal_I2C.h>
#define LCD_ADDR 0x27
#define LCD_COLUMNS 16
#define LCD_ROWS 2
LiquidCrystal_I2C lcd(LCD_ADDR, LCD_COLUMNS, LCD_ROWS);
void setup() {
lcd.begin(0x27,16, 2);
lcd.init();
lcd.backlight();
}
void loop() {
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
lcd.setCursor(2,0)
lcd.print(voltage);
lcd.print("v");
delay(1000);
lcd.clear();
}