#include <Wire.h>
//#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4); //ARDUINO UNO sda/data=A4 CLK=A5
//LiquidCrystal_I2C lcd(0x3F,20,4);
byte customChar0[8] =
{
0B00000,
0B01010,
0B11111,
0B11111,
0B01110,
0B00100,
0B00000
};
byte customChar1[8] = {
0b00100,
0b01110,
0b11111,
0b00100,
0b00100,
0b00100,
0b00100,
0b00100
};
byte customChar2[8] = {
0b00100,
0b00100,
0b00100,
0b00100,
0b00100,
0b11111,
0b01110,
0b00100
};
void setup()
{
Serial.begin(9600);
lcd.init();
lcd.createChar(0, customChar0); // create a new custom character (index 0)
lcd.createChar(1, customChar1); // create a new custom character (index 1)
lcd.createChar(2, customChar2);
}
void loop()
{
lcd.backlight(); //allume lcd
lcd.setCursor(0, 0);
lcd.print("JOJO et YVES");
delay(1000);
lcd.setCursor(0,1);
lcd.print(" LE 4 EPICES");
delay(1000);
lcd.setCursor(0,1);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(" HYERES");
delay(1000);
lcd.setCursor(8, 1);
lcd.write((byte)0); // print the custom char at (2, 0)}
delay(1000);
lcd.setCursor(10, 1);
lcd.write((byte)1); // print the custom char at (2, 0)}
delay(1000);
lcd.setCursor(12, 1);
lcd.write((byte)2); // print the custom char at (2, 0)}
delay(1000);
lcd.init();
delay(2000);
}