#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // 0x27 es la dirección I2C más común, ajusta si es necesario
// make some custom characters:
byte A[8] = {
0b00000,
0b00110,
0b01001,
0b10000,
0b10010,
0b10110,
0b11010,
0b00010
};
byte B[8] = {
0b00000,
0b11111,
0b00000,
0b00000,
0b00000,
0b10001,
0b10001,
0b00000,
};
byte C[8] = {
0b00000,
0b01100,
0b10010,
0b00001,
0b01001,
0b01101,
0b01011,
0b01000,
};
byte I[8] = {
0b00010,
0b00001,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
};
byte J[8] = {
0b01110,
0b00100,
0b11111,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
};
byte K[8] = {
0b01000,
0b10000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
};
void setup() {
Wire.begin();
lcd.init();
lcd.backlight();
// create a new character
lcd.createChar(0, A);
// create a new character
lcd.createChar(1, B);
// create a new character
lcd.createChar(2, C);
// create a new character
lcd.createChar(4, I);
// create a new character
lcd.createChar(5, J);
// create a new character
lcd.createChar(6, K);
lcd.setCursor(0, 0);
lcd.write(byte(0));
lcd.write(byte(1));
lcd.write(byte(2));
lcd.setCursor(0, 1);
lcd.write(byte(4));
lcd.write(byte(5));
lcd.write(byte(6));
}
void loop()
{
}