#include <Wire.h> // Comes with Arduino IDE
// Get the LCD I2C Library here:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
#include <LiquidCrystal_I2C.h>
// set the LCD address to 0x27 for a 20 chars 4 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
void setup() /*—-( SETUP: RUNS ONCE )—-*/
{
lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight
}/*–(end setup )—*/
void loop() /*—-( LOOP: RUNS CONSTANTLY )—-*/
{ //–(Start of main loop)—
//——– Write characters on the display ——————
// NOTE: Cursor Position: Lines and Characters start at 0
// lcd.setCursor(Horizontal position,Line)
lcd.clear(); //Clears the screen.
delay(1000);
lcd.setCursor(4,0); //Start at character 4 on line 0
lcd.print(“University of”);
delay(1000);
lcd.setCursor(6,1); //Next start at character 6 on line 1
lcd.print(“Brighton”);
delay(1000);
lcd.setCursor(4,2);
lcd.print(“Hello World!”);
delay(1000);
lcd.setCursor(0,3);
lcd.print(“20 by 4 Line Display”);
delay(2000);
}// –(end main loop )–