#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
pinMode(A0, INPUT);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Potensiometer");
}
void loop() {
int potValue = analogRead(A0);
int percentage = map(potValue, 0, 1023, 0, 100);
lcd.setCursor(0, 1);
lcd.print("Persentase: ");
lcd.print(percentage);
lcd.print("% ");
delay(250);
}