Custom Character LCD Display

Twitter icon
Facebook icon

//Uitzetten geeft een foutmelding
#include <Wire.h> 
//Nodig voor een LCD I2C Display
#include <LiquidCrystal_I2C.h>


/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 20 chars 2 line display
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

//Accu character
byte battery[8] = {
  B01110,
  B11011,
  B10001,
  B10001,
  B10001,
  B11111,
  B11111,
};

void setup()
{
  lcd.begin(20, 4); 
  lcd.createChar(0, battery);
  lcd.setCursor(0,0); 
  lcd.write(byte(0));
}

void loop() {
         
}