LiquidCrystal_IC2 error

Been using my sketch for some time now, but today I wanted to make some changes.
But I get this error.

Serial_LCD_030216:62: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'
Serial_LCD_030216.ino:62:87: note: candidates are:
In file included from Serial_LCD_030216.ino:12:0:

Worked fine several days ago and I didn't change anything yet.

Paul

The code may help in the answer. But, for what is the error message your problem is the number of pins that you are using in the initialization of the LCD.

#define I2C_ADDR 0x27 // Define I2C Address where the PCF8574A is
#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

LiquidCrystal_I2C lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);

I'm using a Serial LCD, 4 wires +, -, SDA & DCL

I have to use this code to make this work, and it worked fine yesterday.
I even tried and older version of mu code and that didn't work either

Where did you get this?

LiquidCrystal_I2C lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);

I looked online for info on the 20 x 4 LCD and this is what I came up with.

But what I don't understand is, that if it worked yesterday why don't it work today.

I understand what you are saying, I went back to the 2/12/16 sketch that I saved and it is using the LiquidCrystal_IC2.h library also. I tried the LiquidCrystal.h library but that didn't work.

The older one does not work either.

It's been working for the last 3 months. The Arduino Megs is still working right now, just cant access it.
I tried downloading several sketches for the I2C Get a new error for each one.
I thought The LiquidCrystal_I2C.h was corrupt and downloaded the zip file again.
That didn't help. I'm even using a different Arduino. Still don't work
Here's the code I downloaded.
/* YourDuino.com Example Software Sketch
20 character 4 line I2C Display
Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
Connect Vcc and Ground, SDA to A4, SCL to A5 on Arduino
terry@yourduino.com */

/-----( Import needed libraries )-----/
#include <Wire.h> // Comes with Arduino IDE
// Get the LCD I2C Library here:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
#include <LiquidCrystal_I2C.h>

/-----( Declare Constants )-----/
/-----( Declare objects )-----/
// 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
int Positive
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3,Positive); // Set the LCD I2C address

/-----( Declare Variables )-----/

void setup() /----( SETUP: RUNS ONCE )----/
{
Serial.begin(9600); // Used to type in characters

lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight

// ------- Quick 3 blinks of backlight -------------
for(int i = 0; i< 3; i++)
{
lcd.backlight();
delay(250);
lcd.noBacklight();
delay(250);
}
lcd.backlight(); // finish with backlight on

//-------- Write characters on the display ------------------
// NOTE: Cursor Position: Lines and Characters start at 0
lcd.setCursor(3,0); //Start at character 4 on line 0
lcd.print("Hello, world!");
delay(1000);
lcd.setCursor(2,1);
lcd.print("From YourDuino");
delay(1000);
lcd.setCursor(0,2);
lcd.print("20 by 4 Line Display");
lcd.setCursor(0,3);
delay(2000);
lcd.print("http://YourDuino.com");
delay(8000);
// Wait and then tell user they can start the Serial Monitor and type in characters to
// Display. (Set Serial Monitor option to "No Line Ending")
lcd.setCursor(0,0); //Start at character 0 on line 0
lcd.print("Start Serial Monitor");
lcd.setCursor(0,1);
lcd.print("Type chars 2 display");

}/--(end setup )---/

void loop() /----( LOOP: RUNS CONSTANTLY )----/
{
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}

}/* --(end main loop )-- */

/* ( THE END ) */

And these are the errors I Get
Serial_LCD_030616a:21: error: expected initializer before 'LiquidCrystal_I2C'
Serial_LCD_030616a.ino: In function 'void setup()':
Serial_LCD_030616a:31: error: 'lcd' was not declared in this scope
Serial_LCD_030616a.ino: In function 'void loop()':
Serial_LCD_030616a:76: error: 'lcd' was not declared in this scope
expected initializer before 'LiquidCrystal_I2C'

Thanks for you help.

//int Positive
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3,POSITIVE);  // Set the LCD I2C address

Somehow you have messed up the example sketch. Delete the "int positive" and change the word in the constructor to caps. It compiles for me with those changes.

Here is a link to the examples on Terry's site and I see nothing with the syntax you posted http://arduino-info.wikispaces.com/LCD-Blue-I2C

OK
I made those changes, Because POSITIVE was not declared in this scope.

I copied the sketch again and compile it and get.

Serial_LCD_030616a:20: error: 'POSITIVE' was not declared in this scope
'POSITIVE' was not declared in this scope

I'm new to Arduino programing, don't understand how libraries work.

I played around with the Basic Stamp before.

I'm using Arduino 1.6.5

Was using 1.6.7 but nothing would work and was told to back down to 1.6.5

I'm new to Arduino programing, don't understand how libraries work.

You must not have the library installed correctly. Like I said, the sketch with the changes I made compiles.

The situation with the LiquidCrystal_I2C library requires that only one version of the library be installed. There are two places where libraries are installed. There are libraries which come packaged with the IDE, and they are found where the program is installed. Make sure there is no LiquidCrystal library in that folder. You can put it in another folder outside of the libraries folder if you want to hang on to it.

The F.Malpartida library should be in the user libraries, which is a libraries folder of user added libraries in the same location as your sketches are stored.

If you don't actually have that library, you can follow the proceedure given in the link I posted earlier.

I downloaded the Sketch for "YwRobot Arduino LCM1602 IIC V1" which I have from.

http://arduino-info.wikispaces.com/LCD-Blue-I2C

Reinstalled Arduino 1.6.5 even tried Arduino 1.6.7

And this is what I get, I tried 2 different UNO boards

Serial_LCD_030616a:21: error: 'POSITIVE' was not declared in this scope

'POSITIVE' was not declared in this scope

Nothing works, what am I doing wrong?

I downloaded the sketch again from

http://arduino-info.wikispaces.com/LCD-Blue-I2C

and didn't change anything.

Reinstalled Arduino 1.6.7 and that didn't work, went back to Ardunio 1.6.5 and that didn't work.

Even tried a different computer.

I get this error still.

sketch_mar07a:20: error: 'POSITIVE' was not declared in this scope
'POSITIVE' was not declared in this scope

How can I declare POSITIVE.

I tried two different UNO boards and still nothing.

What am I doing wrong?

What am I doing wrong?

I do not think that you have the F.Malpartida library loaded correctly.

Remove or place in folders which are not in the two library locations all other libraries called LiquidCrystal.

Go to https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads and download NewLiquidCrystal_1.3.4.zip

In the IDE, go to Sketch>include library>Add zip library. Find the file you just downloaded and add it. Close and Reopen the IDE. You shouled see NewLiquidCrystal available in the sketch>include library>contributed libraries.

I installed the F.Malpartida library but it put it in the Users/K1PL/MyDocuments/Arduino/libraries

directory not where the libraries were installed when I installed Arduino 1.6.5. Should I rename it .

It's "fmalpartida-new-liquidcrystal-bb6d545c00c3" and move it to the other libraries.

I moved the F.Malpartida library to the other library directory and renamed it LiquidCrystal_I2C

and ran the Sketch and it works OK now.

I still don't understand why when I install the program it installed it on one end of the computer and when I install libraries they get installed on the other end of the computer.

Thanks for your help.

I still don't understand why when I install the program it installed it on one end of the computer and when I install libraries they get installed on the other end of the computer.

There are two different file locations for libraries. One is for the user added libraries and they resided in a path like you cited Users/K1PL/MyDocuments/Arduino/libraries. The librry manager will put user contributed libraries in that location.

The other location is with the IDE, in a path which looks like C:>ProgramFiles(x86)>Arduino>Arduino-1.6.6>libraries.

The libraries which come with the IDE are changed each time the IDE is change. If you put your user libraries in that location they will disappear if you update the IDE to a new version. If they are in a file with your sketches they will still be available if you change IDE versions

I believe the compiler looks first in the IDE libraries file and then in the user libraries file for the #include.
That is why you don't want different libraries with the same name in both locations.

I still don't understand why when I install the program it installed it on one end of the computer and when I install libraries they get installed on the other end of the computer.

One end or the other of a round disk?