#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
byte pacopen[] {B00000, B01110, B10111, B11000, B11111, B01110, B00000, B00000};
byte pacclose[] {B00000, B01110, B10111, B11111, B11111, B01110, B00000, B00000};
byte full[] {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111};
byte empty[] {B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00000};
void setup() {
lcd.init();
lcd.backlight();
}
void loop() {
lcd.createChar(4, pacopen);
lcd.createChar(5, pacclose);
lcd.createChar(6, full);
lcd.createChar(7, empty);
for (byte k = 0; k <= 15; ++k)
{
lcd.setCursor(k, 0);
lcd.write(6);
lcd.setCursor(k, 1);
lcd.write(6);
}
delay(700);
for (byte i = 0; i <= 15; ++i)
{
lcd.setCursor(i, 0);
lcd.write(4);
delay(200);
lcd.setCursor(i, 0);
lcd.write(5);
delay(200);
lcd.setCursor(i, 0);
lcd.write(7);
}
for (byte i = 0; i <= 15; ++i)
{
lcd.setCursor(i, 1);
lcd.write(4);
delay(200);
lcd.setCursor(i, 1);
lcd.write(5);
delay(200);
lcd.setCursor(i, 1);
lcd.write(7);
}
}