Go Down

Topic: LCD library problem, ATmega 168 (Read 2133 times) previous topic - next topic


Feb 27, 2012, 11:39 am Last Edit: Feb 27, 2012, 04:20 pm by 12Haegar34 Reason: 1
Hello, I like to connect an LCD-Display, type "DFRobot 12C/TWI LCD 1602", with my Arduino ATmega 168. I´ve loaded the library from this link http://www.dfrobot.com/index.php?route=product/product&keyword=DFR0063&category_id=0&description=1&model=1&product_id=135 .

After verifiying the example "Hello world", I´ll get the error-message: "In file included from HelloWorld.cpp:5:
C:\ARDUINO\Arduino ATmega128\Development environment\Windows\arduino-0018\libraries\neu/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
C:\ARDUINO\Arduino ATmega128\Development environment\Windows\arduino-0018\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)' ".

The little program, I want to use; is this:

//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
 lcd.init();                      // initialize the lcd

 // Print a message to the LCD.
 lcd.print("Hello, world!");

void loop()

Please, can somebody help me?


It looks like you are running into the issues involving libraries and the update to Arduino V1.

You are running Arduino IDE v0018 but the library that you are using is for Arduino IDE v1.0

Note:  Please use a 'code box' when posting code.  Highlight your code and press the button marked '#'.



I ran into this version issue with a version of the 4D Systems LCD library but in reverse. However, since I only needed limited functions from the library, it was easier for me to strip out the code I needed and include it directly in my sketch. This actually saves me some memory and since I am over 12K with no end in sight, this little bit of savings might matter.

So it looks like you have three options. One is to do what I have done and simply strip and fix what you need and ignore the incompatibility issue. 2nd would be to fix the library to work with your version of Arduino. The 3rd and most logical would be to upgrade to the newest version of the IDE.


Many thanks for your support. Now I worked with the Arduino-Software 0023 and the sketch runs without any problems.


Go Up