#include <LiquidCrystal.h>
const int potentio = A0;
int potentValue = 0 ;
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
void setup() {
// put your setup code here, to run once:
lcd.command(0x21); // Function set: 8-bit, 2 lines, instruction table 1
lcd.command(0xBF); // Set contrast (experiment with different values)
lcd.command(0x04); // Set temperature coefficient
lcd.command(0x14); // Set bias system
lcd.command(0x20);
Serial.begin(115200);
lcd.begin(20, 4);
}
void loop() {
potentValue = analogRead(potentio);
Serial.println(potentValue);
lcd.setCursor(2, 1);
lcd.print("The value is "+ String(potentValue));
delay(1000);
lcd.clear();
// put your main code here, to run repeatedly:
}