// funkcija za izpis besedil in števil, znaka
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,9,8,7);
int analogPin = A0;
byte hertz[8] = {
0b00000,
0b01010,
0b11111,
0b00000,
0b00000
};
void setup() {
lcd.begin(16, 2); // width and height of lcd
}
void loop() {
// calling the void functions
textPrint("besedilo");
steviloPrint(10);
znakPrint(hertz);
}
// void doesn't return anything
void textPrint(String text){ // char *text --> C++ can't comprehend sting, Arduino can
lcd.setCursor(0,1);
lcd.print(text);
}
void steviloPrint(int x){
lcd.setCursor(14,1);
lcd.print(x);
}
void znakPrint(byte znak){
lcd.createChar(2,znak);
lcd.setCursor(0,0);
lcd.write(2);
}