#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
byte x[] = {
B00000,
B00000,
B10001,
B01010,
B00100,
B01010,
B10001,
B00000
};
byte d[] = {
B00000,
B11000,
B10100,
B10010,
B10010,
B10100,
B11000,
B00000
};
void setup() {
lcd.init(); // aktivace lcd
lcd.backlight(); //aktivace podsvícení
lcd.setCursor(0,0); // nastaví kde to má psát
lcd.print("zdary"); //vypíše
lcd.createChar(0, x);
lcd.createChar(1, d);
}
void loop() {
lcd.print(" ");
lcd.write(0);
lcd.write(1);
lcd.setCursor(0,1);
float napeti = analogRead(A1)/(1023/5.0);
lcd.print(String("napeti je ") + napeti + String("V"));
lcd.setCursor(0,2);
}