#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
/*
byte customChar[] = {
// Pfeil nach oben
0b00100,
0b01010,
0b10001,
0b00000,
0b00100,
0b01010,
0b10001,
0b00000,
};
// Tropfen
0b00010,
0b00110,
0b00110,
0b01110,
0b01111,
0b11111,
0b11111,
0b01110,
// Thermometer
B00100, // --X--,
B01010, // -X-X-
B01010, // -X-X-
B01110, // -XXX-
B01110, // -XXX-
B11111, // XXXXX
B11111, // XXXXX
B01110 // -XXX-
*/
// Make custom characters:
byte Heart[] = {
B00000,
B01010,
B11111,
B11111,
B01110,
B00100,
B00000,
B00000
};
byte Bell[] = {
B00100,
B01110,
B01110,
B01110,
B11111,
B00000,
B00100,
B00000
};
void setup() {
lcd.init(); // initialize the lcd
lcd.backlight();
// Create new characters:
lcd.createChar(0, Heart);
lcd.createChar(1, Bell);
// Clears the LCD screen:
lcd.clear();
// Print a message to the lcd:
lcd.print("Custom Character");
delay(1000);
}
void loop() {
// Print all the custom characters:
lcd.setCursor(0, 1);
lcd.write(byte(0));
lcd.setCursor(0, 2);
lcd.write(byte(1));
}