lcd init fault???? help please

hello, can anyone tell me why this message keeps coming up?
thanks for any help peeps :slight_smile:

the fault is ,,,,, exit status 1 within this context,, for the lcd init(),

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

/*#if defined(ARDUINO) && ARDUINO >= 100
#define printByte(args)  write(args);
#else
#define printByte(args)  print(args,BYTE);
#endif
*/
// set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27,16,2);  

const int LED1 = 11;     // the number of the LED 1 pin
const int LED2 = 12;     // the number of the LED 2 pin
bool lcdDone = false;
int makeTest = 0;
const int makeTestSelector = 9;//bush botton used to select the test
int makeSelectorStatus=0;
int makeSelectorStatusOld=0;
int potPin = 0; // pin that reads the pot
int outGoldenPin = 10;
int outScania = 11;
float potVoltage =0 ; 
float potVoltageOld =0 ; 
int potValue = 0;


float voltageThresholdHigh =2.75;// set the value here to the desired threshold  
float voltageThresholdLow = 0.8;// set the value here to the desired threshold  

void setup() {
  Serial.begin(115200);
  // put your setup code here, to run once:
  lcd.init();                      // initialize the lcd 
  lcd.backlight();
  lcd.clear();
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  digitalWrite(LED1, LOW);
  digitalWrite(LED2, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:

  if(Serial.available()){
    makeTest =  Serial.read()-48;
    lcdDone = false;
    Serial.println(makeTest);
  }
  makeSelectorStatus = digitalRead(makeTestSelector);
  if (makeSelectorStatus !=makeSelectorStatusOld){
    if(makeSelectorStatus == HIGH){
      makeTest = makeTest++;
      if (makeTest > 10){
        makeTest = 0;
      }
    }
    makeSelectorStatusOld =makeSelectorStatus;
  }

  //reading the voltage on input for golden pin
  potValue = analogRead(potPin);
  potVoltage = potValue * (5.0 / 1023.0); 
  
  // print out the value you read:
  switch (makeTest){
    case 0:
      if (lcdDone == false){
        lcd.home();
        lcd.print("No Test Selected");
        lcdDone = true;
      }
    break;
    case 1:
      if (lcdDone == false){
        lcd.clear();
        lcd.home();
        lcd.print("Scania");
        //change the reading pin to A)
        potPin = 0;
        //set outScaniatest on and others off
        //digitalWrite(others pins,LOW);  
        lcdDone = true;

      }

Please post the full error message.

sorry. this is the full message

thanks

Arduino: 1.6.10 (Windows 10), Board: "Arduino Nano, ATmega328"

In file included from C:\Users\user\Desktop\testerRev23\testerRev23.ino:10:0:

C:\Users\user\Documents\Arduino\libraries\NewliquidCrystal/LiquidCrystal_I2C.h: In function 'void setup()':

C:\Users\user\Documents\Arduino\libraries\NewliquidCrystal/LiquidCrystal_I2C.h:154:9: error: 'int LiquidCrystal_I2C::init()' is private

int init();

^

testerRev23:43: error: within this context

lcd.init(); // initialize the lcd

^

exit status 1
within this context

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

error: 'int LiquidCrystal_I2C::init()' is private

So, why are YOU trying to call it?

ok im not sure now,
why is the lcd private?

why is the lcd private?

The lcd is not private. It struts its stuff in public.

The method is private because you are not supposed to call it directly. There is most likely some other method that you can call, that in turn calls init().

But, without you posting code and the COMPLETE verbose output, we'll just keep tilting at windmills.

Based on other threads on the same subject (hint) it is because the person who wrote the original sketch was using a different lcd library.

thanks for the replies,
i changed it to lcd (begin) and it works,
thanks for the help