#include <Wire.h>
#include <LiquidCrystal_I2C.h>
const int potentiometerPin = 34;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
Serial.begin(115200);
}
void loop() {
int potValue = analogRead(potentiometerPin);
float voltage = potValue * (5 / 4095.0); // Convert to voltage (0 to 5V)
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Pot Value: ");
lcd.setCursor(0, 1);
lcd.print(voltage, 2);
lcd.print(" V");
delay(500);
}