#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 20
#define LCD_ROWS 4
int pot = A0;
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_ROWS);
void setup() {
// put your setup code here, to run once:
pinMode(pot, INPUT);
lcd.init();
lcd.backlight();
lcd.print("ahoj");
lcd.setCursor(10,1);
lcd.print("10 1");
lcd.blink();
Serial.begin(9600)
}
void loop() {
// put your main code here, to run repeatedly:
int potValue = analogRead(pot);
Serial.println(potValue);
mPotValue = map(potValue, 0 , 1023 , 0 , 20);
lcd.setCursor(mPotValue, 1);
lcd.blink();
}