#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);
uint8_t pacman[8] = {
0b00000,
0b00000,
0b01110,
0b11011,
0b11111,
0b01110,
0b00000,
0b00000
};
uint8_t pacmanOpen[] = {
0b00000,
0b00000,
0b01110,
0b11011,
0b11100,
0b01110,
0b00000,
0b00000
};
uint8_t dot[] = {
0b00000,
0b00000,
0b00000,
0b00110,
0b00110,
0b00000,
0b00000,
0b00000
};
void setup()
{
lcd.init();
lcd.createChar(1,pacman);
lcd.createChar(2, dot);
// lcd.begin(20,4);
lcd.backlight();
lcd.setCursor(1,0);
lcd.print("Nama : Bjorka");
lcd.setCursor(1,1);
lcd.print("Asal : Anonymous");
lcd.setCursor(1,2);
lcd.print("Hoby : Oprek2 data");
}
void loop(){
for (int i = 3; i < 16; i++) {
lcd.setCursor(i, 3);
lcd.print("\1");
for (int j = i + 1; j < 16; j++) {
lcd.setCursor(j, 3);
lcd.print("\2");
}
lcd.createChar(1, pacman);
delay(200);
lcd.createChar(1, pacmanOpen);
delay(200);
lcd.setCursor(i, 3);
lcd.print(" ");
}
delay(800);
}