Code: Select all
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup()
{
byte customChar0[8] = {31,17,10,04,14,31,31,00}; // Clock
byte customChar1[8] = {04,14,14,14,31,00,04,00}; // Bell
// Do assign lcd.begin() before lcd.createChar()
lcd.begin(20,4); // Initialize the lcd for 20 chars 4 lines
lcd.createChar(0,customChar0); // Clock
lcd.createChar(1,customChar1); // Bell
lcd.print("Hello");
lcd.write(byte(0));
lcd.write(byte(1));
}