#include <LiquidCrystal_I2C.h> // Library for LCD
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27, 16 column and 2 rows
void setup() {
// put your setup code here, to run once:
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
lcd.setCursor(0, 0);
lcd.print("Hello World!");
byte customChar[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
lcd.createChar(0, customChar); // create a new custom character
lcd.setCursor(4, 0); // move cursor to (2, 0)
lcd.write((byte)0);
lcd.setCursor(7,0);
lcd.write((byte)0); // print the custom char at (2, 0)
}
void loop() {
// put your main code here, to run repeatedly:
}