Jeelib + LiquidCrystal_I2C error

Hi, I'm trying to run LCD with RFM12b but I receive a compilation error :

LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal::pulseEnable()': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:279: multiple definition ofLiquidCrystal::pulseEnable()' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:297: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal::send(unsigned char, unsigned char)': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:122: multiple definition ofLiquidCrystal::send(unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:281: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal::init(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:208: multiple definition ofLiquidCrystal::init(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:235: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:76: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:229: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:76: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:229: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:70: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:223: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:70: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:223: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:64: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:211: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:64: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:211: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:57: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:217: first defined here LiquidCrystal\LiquidCrystal.cpp.o: In function LiquidCrystal': C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp:57: multiple definition ofLiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' jeelib\PortsLCD.cpp.o:C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp:217: first defined here

Does anyone experienced similar problem ?

Regards exTL

Show us your sketch.

I suspect you included LiquidCrystal.[u]cpp[/u]. You should include LiquidCrystal.[u]h[/u] instead.

Cheers, /dev

Hi,
Sketch in attachment. As far as I get it it’s due duplication of JeeLib that already handle LCD and separate LCD libraries. No idea how to set it up.

Regards
exTL

rFM12_PIR_sensor_Receiver.ino (2.21 KB)

Comment out the first include:

//#include <LCD.h>
#include <LiquidCrystal_I2C.h>

And make sure you don’t have two different LCD libraries. The old library LiquidCrystal_I2C.h has this as the first two lines:

    #ifndef FDB_LIQUID_CRYSTAL_I2C_H
    #define FDB_LIQUID_CRYSTAL_I2C_H

The new library LiquidCrystal_I2C.h has this as the first two lines:

    // ---------------------------------------------------------------------------
    // Created by Francisco Malpartida on 20/08/11.

The .INO file is using a constructor for the new library:

    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

Cheers,
/dev

I did that - no change. Will the new LiquidCrystal_I2C library make any difference here ?

Thanks exTL

You have two copies of the LiquidCrystal library:

    C:\Users\Przemek\Documents\Arduino\libraries\jeelib/PortsLCD.cpp
    C:\Users\Przemek\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.cpp

You should delete libraries\LiquidCrystal, if you're building for a jeelabs board.

Cheers, /dev

Thanks /dev.

I deleted LiquidCrystal library - sketch compiles with no error. Nice ! But LCD doesn't seem to respond to sketch.

I've got 20x4 display, responding to address 0x27 while PortsLCD library refers to 0x24 and to some port number - I assume it's either 1 or 4.

I've tried both - nothing; modified address inside the library to 0x27 - nothing. Don't know where to look - any ideas ?

exTL

while PortsLCD library refers to 0x24 and to some port number - I assume it's either 1 or 4.

->> ???? Do you know or assume ? At least the Arduino only works on known and not on assumed instructions.

Pls show us your modified sketch. And: did you really delete ALL duplicate LCD libraries?

What I found on the web is info that this port is usually Port1 or Port4.
I checked both with no result.

I don’t know whether port and address are the same in this case so I’d appreciate some basic info.

Sketch in attachment.

thanks
exTL

rFM12_PIR_sensor_Receiver.ino (2.11 KB)