#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int pocet = random(1, 21);
lcd.clear();
for (int i = 0; i <pocet; i++) {
int x = random(0, 20);
int y = random(0, 4);
lcd.setCursor(x, y);
lcd.print("X");
}
Serial.println(pocet);
delay(1000);
}