#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
// Define I2C Address where the PCF8574* is
#define I2C_ADDR 0x3F
// Define LCD Pins
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
// Initialize LiquadCrystal with pin setup
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
void setup()
{
// Setup for LCD width and lines
lcd.begin (16,2);
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
// Reset cursor to home
lcd.home ();
// Print Hello World
lcd.print("hello");
//lcd.setCursor(0, 2);
//lcd.print("world");
//delay(1000);
//lcd.clear();
// Print Hello World
}
void loop()
{
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(150);
}
}