Arduino – I2C 20 x 4 LCD Display

I2C Control Boards allow you to connect an LCD Display to your Arduino using only 4 wires.

Note: I2C is an Addressable Communication Protocol. 0x27 should be the default address of the display. If this does not work you will have to find the address by running a sketch designed to find I2C address on an Arduino: https://playground.arduino.cc/Main/I2cScanner/

Links:

Functional Parts in the Project:


#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);

void setup()
{  
   lcd.begin(20,4); 
   lcd.setBacklightPin(3,POSITIVE);
   lcd.setBacklight(HIGH);
   lcd.setCursor(0,0);
   lcd.print("Hello, World!");
   lcd.setCursor(0,1);
   lcd.print("This is:"); 
   lcd.setCursor(0,2);
   lcd.print("An I2C Display");   
   lcd.setCursor(4,3);
   lcd.print("Kinda Cool...");
}
void loop()
{
}

Be the first to comment

Leave a Reply