#include <LiquidCrystal.h>
// rs,e,D0-D7
LiquidCrystal lcd(12,11,10,9,8,7);
const int PotPin = A0;
// izpis noveha znaka
byte srcek[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000
};
void setup() {
lcd.begin(16,2);
lcd.createChar(2,srcek);
}
void loop() {
lcd.setCursor(0,0);
lcd.write(2);
tekstPrint("Besedilo");
stPrint(10);
}
// funkcija za izpis
// besedila
void tekstPrint(String tekst){ //(char *tekst) ali (char tekst[])
lcd.setCursor(0,1);
lcd.print(tekst);
}
// števila
void stPrint(int x){
lcd.setCursor(14,1);
lcd.print(x);
}