Pages: [1]   Go Down
Author Topic: LCD library problem, ATmega 168  (Read 1579 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

//DFRobot.com
//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.backlight();
  lcd.print("Hello, world!");
}

void loop()
{
}

Please, can somebody help me?
« Last Edit: February 27, 2012, 10:20:54 am by 12Haegar34 » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 26
Posts: 4119
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 '#'.


Don
Logged

Cleveland, TN
Offline Offline
Full Member
***
Karma: 2
Posts: 207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Luck,

Wade

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Helge
Logged

Pages: [1]   Go Up
Jump to: