#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
// make some custom characters:
byte A[8] = {
0b00000,
0b00000,
0b00001,
0b00010,
0b00100,
0b01000,
0b11111,
0b01000
};
byte B[8] = {
0b00000,
0b11111,
0b01000,
0b00100,
0b10010,
0b00001,
0b11111,
0b00010
};
byte C[8] = {
0b00000,
0b11111,
0b00000,
0b00011,
0b00011,
0b00000,
0b11111,
0b00000
};
byte D[8] = {
0b00000,
0b10000,
0b01000,
0b00100,
0b00010,
0b00001,
0b11111,
0b00010
};
byte I[8] = {
0b01000,
0b01000,
0b01001,
0b01001,
0b01001,
0b01001,
0b01111,
0b00000
};
byte J[8] = {
0b00010,
0b00010,
0b10010,
0b10010,
0b10010,
0b10010,
0b11111,
0b00000
};
byte K[8] = {
0b11000,
0b11000,
0b00000,
0b00000,
0b00000,
0b00000,
0b11111,
0b00000
};
byte L[8] = {
0b11010,
0b11010,
0b00010,
0b00010,
0b00010,
0b00010,
0b11110,
0b00000
};
void setup() {
// initialize LCD and set up the number of columns and rows:
lcd.init();
lcd.backlight();
// create a new character
lcd.createChar(0, A);
// create a new character
lcd.createChar(1, B);
// create a new character
lcd.createChar(2, C);
// create a new character
lcd.createChar(3, D);
// create a new character
lcd.createChar(4, I);
// create a new character
lcd.createChar(5, J);
// create a new character
lcd.createChar(6, K);
// create a new character
lcd.createChar(7, L);
lcd.setCursor(0, 0);
lcd.write(byte(0));
lcd.write(byte(1));
lcd.write(byte(2));
lcd.write(byte(3));
lcd.setCursor(0, 1);
lcd.write(byte(4));
lcd.write(byte(5));
lcd.write(byte(6));
lcd.write(byte(7));
}
void loop()
{
}