Help with this code

Hi all
I am unable to place all the code as it's to big, so here is the part of the code that i think has a prob:

//---Libraries
#include <Wire.h>                                       // I2C library
#include <LiquidCrystal_I2C.h>                          // I2C LCD library
LiquidCrystal_I2C lcd(0x27,20,4);                       // set the LCD address to 0x27 for a 20 chars and 4 line display

//--Define constants
#define encoder0PinA  2                        // Setup the encoder pins
#define encoder0PinB  4                        // Setup the encoder pins
#define encoderbtn 6                           // encoder pushbutton
#define DDS_CLOCK 180000000                    // 30MHz x 6 (onboard rock)


//---define variables
volatile long encoder0Pos = 10000000;          // setup a value to count with
volatile long oldencoder0Pos = encoder0Pos ;   // used to compare
int varVal;                                    // variable for reading the pin status
int varHz = 1;                                 // 1=Hz, 2=KHz, 3=10KHz, 4=100KHz, 5=MHz tuning step mode
int long varMult = 1;                          // used to plug in as the multiplier
char varBuf1[8];                               // used to convert an int to a string array for the freq display
char varBuf2[10];                              // used to format the freq display with commas      
unsigned long varCurrentMillis;                // current time via the Millis function
long varPreviousMillis = 0;                    // used as a timer to avoid bounce
long varInterval = 500;                        // interval used with a timer (milliseconds)
byte ddsLOAD = 8;                              // AD9851 LOAD   Arduino D8
byte ddsCLOCK = 9;                             // AD9851 CLOCK  Arduino D9
byte ddsDATA = 10;                             // AD9851 FQ_UD  Ardunio D10
long varTuning_word;                           // Used to hold the word for the DDS 



void setup() { 
  //---Setup encoder  
  pinMode(encoderbtn, INPUT);
  pinMode(encoder0PinA, INPUT); 
  digitalWrite(encoder0PinA, HIGH);       // turn on pullup resistor
  pinMode(encoder0PinB, INPUT); 
  digitalWrite(encoder0PinB, HIGH);       // turn on pullup resistor
  attachInterrupt(0, doEncoder, CHANGE);  // encoder pin on interrupt 0 - pin 2
  //---Initial screen setup   
  lcd.init();   //THIS IS LINE 42       // initialize the lcd 
  lcd.backlight();                        // turn on the lcd backlight
  lcd.clear();                            // good practice to make sure that display is clear
  lcd.setCursor(0,0);                     // column,row
  lcd.print("Freq: "); 
  sprintf(varBuf1,"%8lu", encoder0Pos);   // convert initial freq for display
  sprintf(varBuf2,"%1c%1c,%1c%1c%1c,%1c%1c%1c", varBuf1[0], varBuf1[1], varBuf1[2], varBuf1[3], varBuf1[4], varBuf1[5], varBuf1[6], varBuf1[7], varBuf1[8]);
  lcd.print(varBuf2);
  lcd.setCursor(18,0);                    // column,row
  lcd.print("Hz");                        // prints out step; should variablize
  //---setup pins for AD9851
  pinMode (ddsDATA, OUTPUT);              // sets pin 10 as OUPUT
  pinMode (ddsCLOCK, OUTPUT);             // sets pin 9 as OUTPUT
  pinMode (ddsLOAD, OUTPUT);              // sets pin 8 as OUTPUT
  sendFrequency(encoder0Pos);             // send the initial freq to the DDS
}

I get this error msg when i try and compile:
_9851_code.ino: In fuction 'void setup()':
_9851_code:42: error: 'class liquidcrystal_I2c' has no member named 'INT'

Howard

I get this error msg when i try and compile:
_9851_code.ino: In fuction 'void setup()':
_9851_code:42: error: 'class liquidcrystal_I2c' has no member named 'INT'

So, don't call it!

http://snippets-r-us.com is down the road a ways. Perhaps they can help you with your snippets. Here, we expect you to attach code that is too large to post. We also expect you to post links to all non-standard libraries.

http://snippets-r-us.com

Firefox can't find the server at snippets-r-us.com.

Firefox can't find the server at snippets-r-us.com.

Looks like you're stuck with us then.
You can attach code that is too long to post.

I don't see anything at or near the line you identified which would cause that error. However, it's possible that there is some macro substitution going on that we can't see, and it's also possible that the error is actually coming from somewhere else.

If you comment out the line that you think is causing the error, does the error go away?

If you comment out the line that you think is causing the error, does the error go away?

Yes the error does go away.

Yes the error does go away.

Which line was it?

In the code above!

lcd.init();   //THIS IS LINE 42       // initialize the lcd

Suggest you turn on verbose logging for compilation, review the output log when you recompile and find out which temporary directory your sketch is being compiled in, then look at the .cpp file that is generated from your .ino file and see whether you can see any reason for the error.

I'm guessing then that you have, somewhere something like

#define init INT

but you still haven't posted everything, so I'll leave it as a guess.

found these file's _9851_code.cpp.d and _9851_code.cpp
Which one ?

G7LQY:
found these file's _9851_code.cpp.d and _9851_code.cpp
Which one ?

Perhaps you want to find out what they contain. How do you suppose you could do that?

Perhaps you want to find out what they contain. How do you suppose you could do that?

I don't know, but the _9851_code.cpp file just looks like the code in the .ino file.

AWOL
I did a find in the code for #define init INT but could not find anything.

Like I said, without code, a guess.
No more guesses, sorry.

We also expect you to post links to all non-standard libraries.

You still haven't.