Trouble with LiquidCrystal library

I have never had any trouble with the standard Liquid crystal library that I have been using successfully, however, I need to install the I2C Liquid crystal version.

From https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads and selected LiquidCrystal_v1.2.1.zip

I then went to my sketch and then Include Library - Manage Libraries - Add .zip Library - Downloads - LiquidCrystal_v1.2.1.zip and then checked open.

When I run my test sketch I get an error message: C:Users\User\Documents\Arduino\libraries\LiquidCrystal\I2C_ID.cpp:5:26:fatal error: /Wire/Wire.h: No such file or directory.

My sketch includes Wire.h so ????

Should the library be in the Arduino Program File (x86) or in the Documents Arduino folder?

I have tried to follow the procedure in learning "Installing Additional Arduino Libraries"

I must be doing something fundamentally wrong!

Hi,
What IDE version are you using?
What model Arduino?
Have you tried an example code from the library?

Tom… :slight_smile:

I have had the wire library installed previously for a long period and have had no problems with it for other projects.

I am using an Arduino Uno

IDE is 1.6.8

A code example is as follows.

I really only want the #include <LiquidCrystal_I2C.h> library and have commented out the others (except Wire.h)

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

// The LCD constructor - address shown is 0x27 - may or may not be correct for yours
// Also based on YWRobot LCM1602 IIC V1
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup()
{
lcd.begin(16,2); // sixteen characters across - 2 lines
lcd.backlight();
// first character - 1st line
lcd.setCursor(0,0);
lcd.print(“Hello World!”);
// 8th character - 2nd line
lcd.setCursor(8,1);
lcd.print("-------");
}

void loop()
{
}

Another problem I have found is that by installing this library it over-rides the old (non I2C) version and existing projects using the old LiquidCrystal.h library don’t work.

Another sketch example that also failed: See following error message

/* Demonstration sketch for PCF8574T I2C LCD Backpack
Uses library from https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads GNU General Public License, version 3 (GPL-3.0) */
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7); // 0x27 is the I2C bus address for an unmodified backpack

void setup()
{
// activate LCD module
lcd.begin (16,2); // for 16 x 2 LCD module
lcd.setBacklightPin(3,POSITIVE);
lcd.setBacklight(HIGH);
}

void loop()
{
lcd.home (); // set cursor to 0,0
lcd.print(" tronixlabs.com");
lcd.setCursor (0,1); // go to start of 2nd line
lcd.print(millis());
delay(1000);
lcd.setBacklight(LOW); // Backlight off
delay(250);
lcd.setBacklight(HIGH); // Backlight on
delay(1000);
}

Error message after compilation:

WARNING: Category ‘’ in library OneWire is not valid. Setting to ‘Uncategorized’
C:\Users\user\Documents\Arduino\libraries\LiquidCrystal\I2CIO.cpp:35:26: fatal error: …/Wire/Wire.h: No such file or directory

#include <…/Wire/Wire.h>

^

compilation terminated.

exit status 1

Hi,
Using IDE 1.6.11 and loading the zip file into Documents/Arduino/Library
The code in post #4

Then using SKETCH… Include Library… Add Zip… finding the zip file I down loaded and selecting it, allowing for it to be included.

Note my screen, the brown highlighted library items.
Screen1a.jpg
It compiled for Arduino UNO.
Note ALL three library items are brown.

Tom… :slight_smile:

Hi, Also. Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Tom.. :)

Thanks TomGeorge,

Is it that I am using IDE 1.6.8 that it doesn't work?

I see that the latest version is 1.6.13 should I download this Arduino version?

Should I download and install NewliquidCrystal_1.3.4.zip instead of LiquidCrystal_V1.2.1.zip?

Should the library be in the Arduino Program File (x86) or in the Documents Arduino folder?

I must say I am getting confused.

Hi, I don't think the IDE version is the problem, but try it. Also yes, download the 1.3.4.zip version, that is what I used. Place the zip file in Documents/Arduino/Library directory. Do not unzip it.

Tom... :) PS you can have more than one IDE version on you computer at once.

Thanks Tom,

After downloading and installing 1.3.4 as per your instructions, it compiled fine

I didn't need to change the IDE version.

I suspect that 1.2.1 has problems.

Thanks again so much.

Hi,
No worries, it may be because of IDE upgrades from when the library was previously edited, may have caused the need to do the last library update.

Tom… :slight_smile:

Gaggymoon: I suspect that 1.2.1 has problems.

That version of the library was written assuming that the library will be installed in the Arduino IDE installation folder, which is a very bad idea, and also that the Wire library is located in a place where it no longer is. I don't know what the author was thinking.