#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd (0x27, 16, 2);
byte customChar0 [8] = {
0b00001,
0b00010,
0b00100,
0b01000,
0b01000,
0b00100,
0b00010,
0b00001
};
byte customChar1 [8] = {
0b00000,
0b11110,
0b00100,
0b01000,
0b00100,
0b00010,
0b00001,
0b11110
};
byte customChar2 [8] = {
0b00000,
0b01010,
0b01010,
0b00000,
0b10001,
0b01110,
0b00000,
0b00000
};
byte customChar3 [8] = {
0b00000,
0b00100,
0b01010,
0b10001,
0b01010,
0b00100,
0b00000,
0b00000
};
byte customChar4 [8] = {
0b00000,
0b00100,
0b01110,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
byte customChar5 [8] = {
0b01110,
0b10001,
0b10001,
0b10001,
0b01110,
0b00000,
0b11111,
0b00000
};
byte customChar6 [8] = {
0b01110,
0b10001,
0b10001,
0b01110,
0b10000,
0b01000,
0b00100,
0b00010
};
byte customChar7 [8] = {
0b00000,
0b01010,
0b11111,
0b01010,
0b11111,
0b01010,
0b00000,
0b00000
};
void setup() {
lcd.init();
lcd.backlight();
lcd.createChar(0, customChar0);
lcd.createChar(1, customChar1);
lcd.createChar(2, customChar2);
lcd.createChar(3, customChar3);
lcd.createChar(4, customChar4);
lcd.createChar(5, customChar5);
lcd.createChar(6, customChar6);
lcd.createChar(7, customChar7);
lcd.setCursor (2,0);
lcd.write((byte)0);
lcd.write((byte)1);
lcd.write((byte)2);
lcd.write((byte)3);
lcd.setCursor (2,1);
lcd.write((byte)4);
lcd.write((byte)5);
lcd.write((byte)6);
lcd.write((byte)7);
}
void loop() {
// put your main code here, to run repeatedly:
}