lcd.init or lcd.begin? - HELP!

Hi guys, trying to turn on my I2C LCD, following a keypad tutorial from tech-zen.

http://tech-zen.tv/episodes/shows/make-it-work/episodes/keypad-input-to-an-arduino-episode-11
Here is the code:

void setup()
{
  lcd.init();                      // initialize the lcd 
  //lcd.init();
  
  // Print a message to the LCD.
  lcd.backlight();
  
  displayCodeEntryScreen();
  
  //setup and turn off both LEDs
  pinMode(redLED, OUTPUT);
  pinMode(greenLED, OUTPUT);
  digitalWrite(redLED, LOW);
  digitalWrite(greenLED, LOW);
  
}

Here is the Error message:

In file included from C:\Users\q\Documents\Arduino\Keypad_Basic_1\Keypad_Basic_1.ino:2:0:
C:\Users\q\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal_I2C.h: In function 'void setup()':
C:\Users\q\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal_I2C.h:154:9: error: 'int LiquidCrystal_I2C::init()' is private

  • int init();*
  • ^*
    Keypad_Basic_1:33: error: within this context
  • lcd.init(); // initialize the lcd*
  • ^*
    exit status 1
    within this context

Is there a way around this? lcd.begin is not working.. :slightly_frowning_face:

This is what worked for me:

#include <Wire.h>
#include <FastIO.h>
#include <I2CIO.h>
#include <LCD.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>

#define GPIO_ADDR   0x27
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);    // set the LCD I2C address

void setup() {

lcd.begin(16,2);

}

Thanks mate, ill give that a whirl!

Works a treat! No LED's..but main thing works!