// LCD custom characters
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd (0x27, 16, 2);
byte customchar[][8] = {
{B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // full
{B11111, B11110, B11110, B11110, B11110, B11110, B11110, B11111}, // 4/5
{B11111, B11100, B11100, B11100, B11100, B11100, B11100, B11111}, // 3/5
{B11111, B11000, B11000, B11000, B11000, B11000, B11000, B11111}, // 2/5
{B11111, B10000, B10000, B10000, B10000, B10000, B10000, B11111}, // 1/5
{B11111, B00000, B00000, B00000, B00000, B00000, B00000, B11111}, // left bracket
{B11111, B00001, B00001, B00001, B00001, B00001, B00001, B11111}, // right bracket
{B00000, B10001, B01010, B00100, B00100, B01010, B10001, B00000} // "X"
};
const byte sizechar = sizeof(customchar) / sizeof(customchar[0]);
void setup() {
lcd.init (); // I2C library does not use .display or .begin or .clear
lcd.backlight();
for (byte i = 0; i < 8; i++)
lcd.createChar(i, customchar[i]); // store custom characters in LCD RAM
for (int i = 0; i < 8; i++) {
lcd.setCursor(i / 2 + 6, i % 2); // increment cursor location (col, row)
lcd.write(i);
}
}
void loop()
{}