#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 20
#define LCD_LINES 4
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
byte customChar_p[] = {
B11111,
B10001,
B10001,
B10001,
B10001,
B10001,
B10001,
B00000
};
byte customChar_c[] = {
B00000,
B00000,
B10010,
B10010,
B10010,
B10010,
B11111,
B00001
};
byte customChar_n[] = {
B00000,
B00000,
B10001,
B10001,
B11111,
B10001,
B10001,
B00000
};
byte customChar_k[] = {
B00000,
B00000,
B10001,
B10010,
B11100,
B10010,
B10001,
B00000
};
byte customChar_i[] = {
B00000,
B00000,
B10001,
B10011,
B10101,
B11001,
B10001,
B00000
};
byte customChar_m[] = {
B00000,
B00000,
B10001,
B11011,
B10101,
B10101,
B10001,
B00000
};
byte customChar_f[] = {
B00000,
B00000,
B01110,
B10101,
B10101,
B01110,
B00100,
B00100
};
byte customChar_y[] = {
B01010,
B00100,
B10001,
B10011,
B10101,
B11001,
B10001,
B00000
};
void setup() {
// Init
lcd.init();
lcd.backlight();
// Print something
lcd.begin(20,4);
lcd.createChar(0, customChar_p);
lcd.createChar(1, customChar_c);
lcd.createChar(2, customChar_n);
lcd.createChar(3, customChar_k);
lcd.createChar(4, customChar_i);
lcd.createChar(5, customChar_m);
lcd.createChar(6, customChar_f);
lcd.createChar(7, customChar_y);
lcd.setCursor(3, 2);
lcd.write(0);
lcd.print("po");
lcd.write(1);
lcd.write('e');
lcd.write(2);
lcd.write(3);
lcd.write('o');
lcd.setCursor(3, 1);
lcd.write('T');
lcd.write(4);
lcd.write(5);
lcd.write('o');
lcd.write(6);
lcd.write('i');
lcd.write(7);
}
void loop() {
}