ArduinoGeneral

I2C-LCD dosn't work (software / compiler - problem)

userHead df0021 2012-04-28 07:26:00 17493 Views19 Replies
Hello,
my first beginning with Arduino (Itearduino) was the not succesfull.
Board and I2C-LCD are connected, I did try the sketch Hello, world. The backgrundlight is on - but the compiler shows a failure message:

c:\Progr-MCU\Arduino\arduino-1.0\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
c:\Progr-MCU\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

After using the newest Arduino-IDE did I try an older version (...0022), but it was not better.

What can I do?

Regards
df0021

2012-05-07 10:29:40 Hi


I'm glad you got it working! I did not write it, we have updated it to be compatible with IDE 1.0 You should be able to get it working with 1.0 as well, just repeat the process for IDE 1.0


I don't think its necessary to update. We still use 0022 for many projects. Its really a matter of preference.

userHeadPic Hector
2012-05-07 10:29:40 Hi


I'm glad you got it working! I did not write it, we have updated it to be compatible with IDE 1.0 You should be able to get it working with 1.0 as well, just repeat the process for IDE 1.0


I don't think its necessary to update. We still use 0022 for many projects. Its really a matter of preference.

userHeadPic Hector
2012-05-05 05:08:01 Hi, Hector

it works!
I did delete the whole Ardiuno-0022 and Arduino1.0, then did I download arduino-0022 again and the library from Wiki - and there where no problems concerning compiling, uplaoding and function at the iteardino!
Did you write the LiquidCrystal_I2C-1 new and especially for my little Arduino?
I did intend to use the Arduino for a urgent and quick project without to much programming and tinking. Now I can start!

Works your new LiquidCrystal_I2C-1 only in Arduino-0022? What is, when I my Arduino update to the version 1.0 (is it necessary?).

I thank you very much for your kindly help!
df0021
userHeadPic df0021
2012-05-05 05:08:01 Hi, Hector

it works!
I did delete the whole Ardiuno-0022 and Arduino1.0, then did I download arduino-0022 again and the library from Wiki - and there where no problems concerning compiling, uplaoding and function at the iteardino!
Did you write the LiquidCrystal_I2C-1 new and especially for my little Arduino?
I did intend to use the Arduino for a urgent and quick project without to much programming and tinking. Now I can start!

Works your new LiquidCrystal_I2C-1 only in Arduino-0022? What is, when I my Arduino update to the version 1.0 (is it necessary?).

I thank you very much for your kindly help!
df0021
userHeadPic df0021
2012-05-04 17:32:40 Ok,


I would recommend you delete the library all together from both the IDE0022 and V1.


Then download it again from the [url=http://www.dfrobot.com/wiki/index.php?title=I2C/TWI_LCD1602_Module_(SKU:_DFR0063)]Wiki[/url]


and place it in: Arduino-0022\libraries\ .Do not modify the folder name.


You can also place it in the Arduino-1.0\libraries\ folder.


If you placed them in the correct spot, you should be able to open the Arduino IDE and check in the Examples menu and find the LiquidCrystal I2C sub menu and choose any of the sample codes from there. It should compile for you.


Please keep in mind that the Arduino IDE should be closed completely when removing and replacing libraries. If it was not closed, then just close the IDE and re-open it, the changes should now take effect.



userHeadPic Hector
2012-05-04 17:32:40 Ok,


I would recommend you delete the library all together from both the IDE0022 and V1.


Then download it again from the [url=http://www.dfrobot.com/wiki/index.php?title=I2C/TWI_LCD1602_Module_(SKU:_DFR0063)]Wiki[/url]


and place it in: Arduino-0022\libraries\ .Do not modify the folder name.


You can also place it in the Arduino-1.0\libraries\ folder.


If you placed them in the correct spot, you should be able to open the Arduino IDE and check in the Examples menu and find the LiquidCrystal I2C sub menu and choose any of the sample codes from there. It should compile for you.


Please keep in mind that the Arduino IDE should be closed completely when removing and replacing libraries. If it was not closed, then just close the IDE and re-open it, the changes should now take effect.



userHeadPic Hector
2012-05-03 20:23:00 Hi Hector

I know, it is a little bit tricky to find out the right place of the headerfiles. I checked it again and again and did it compare with the other files included in the system.
I placed it in ardino0022/libraries at the same place, where the "normal" directories are.
I did compare the structure of the old and my new directories - it was no difference.
I did change the names of the directories and checked in the arduino-ide what happened - the ide did show the changed names at the right place.
At least did I change in the file, named by the error message, e.g. uint8_t in uint13_t, in order to check if is the right file. The error messages did show the new errors.

I'm sure (relatively) ardino has the right files to work with. I repaet the failure message and you can see, that the right file is named:
HelloWorld:4: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino-0022\arduino-0022\libraries\[b]LiquidCrystal_I2C_vArd10/LiquidCrystal_I2C.h[/b]:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino-0022\arduino-0022\hardware\arduino\cores\arduino/Print.h:40: note: virtual void Print::write(uint8_t)

I'm afraid, there is an other problem.
But it seems to be not to big (so I hope). The ide shows in the sketch only one line marked:
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

and below it is to read:
cannot declare variale 'lcd' to be of abstract type 'LiquidCrystal_I2C'.

I hope the information is enough so you can find out the raison of my problem.

regards
df0021

userHeadPic df0021
2012-05-03 20:23:00 Hi Hector

I know, it is a little bit tricky to find out the right place of the headerfiles. I checked it again and again and did it compare with the other files included in the system.
I placed it in ardino0022/libraries at the same place, where the "normal" directories are.
I did compare the structure of the old and my new directories - it was no difference.
I did change the names of the directories and checked in the arduino-ide what happened - the ide did show the changed names at the right place.
At least did I change in the file, named by the error message, e.g. uint8_t in uint13_t, in order to check if is the right file. The error messages did show the new errors.

I'm sure (relatively) ardino has the right files to work with. I repaet the failure message and you can see, that the right file is named:
HelloWorld:4: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino-0022\arduino-0022\libraries\[b]LiquidCrystal_I2C_vArd10/LiquidCrystal_I2C.h[/b]:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino-0022\arduino-0022\hardware\arduino\cores\arduino/Print.h:40: note: virtual void Print::write(uint8_t)

I'm afraid, there is an other problem.
But it seems to be not to big (so I hope). The ide shows in the sketch only one line marked:
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

and below it is to read:
cannot declare variale 'lcd' to be of abstract type 'LiquidCrystal_I2C'.

I hope the information is enough so you can find out the raison of my problem.

regards
df0021

userHeadPic df0021
2012-05-03 16:45:01 Hi,


I have not seen this error, and I can not replicate it here. Please make sure you have all of the files for the library in the correct directory, and close then re-open the Arduino IDE.
userHeadPic Hector
2012-05-03 16:45:01 Hi,


I have not seen this error, and I can not replicate it here. Please make sure you have all of the files for the library in the correct directory, and close then re-open the Arduino IDE.
userHeadPic Hector
2012-05-02 21:23:27 Hi Hector

I did just use Ardino0022 (after transfering the right Headerfile in the right path),
but I get a failure message:


HelloWorld:4: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino-0022\arduino-0022\libraries\LiquidCrystal_I2C_vArd10/LiquidCrystal_I2C.h:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino-0022\arduino-0022\hardware\arduino\cores\arduino/Print.h:40: note: virtual void Print::write(uint8_t)

My knowledge of Ardino-programming is unfortunable to small, so I'm not able to correct the failure and therefore I do need help.

regards
df0021
userHeadPic df0021
2012-05-02 21:23:27 Hi Hector

I did just use Ardino0022 (after transfering the right Headerfile in the right path),
but I get a failure message:


HelloWorld:4: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino-0022\arduino-0022\libraries\LiquidCrystal_I2C_vArd10/LiquidCrystal_I2C.h:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino-0022\arduino-0022\hardware\arduino\cores\arduino/Print.h:40: note: virtual void Print::write(uint8_t)

My knowledge of Ardino-programming is unfortunable to small, so I'm not able to correct the failure and therefore I do need help.

regards
df0021
userHeadPic df0021
2012-05-02 12:25:08 Hi,


When you try Arduino IDE 0022, what is the problem?
userHeadPic Hector
2012-05-02 12:25:08 Hi,


When you try Arduino IDE 0022, what is the problem?
userHeadPic Hector
2012-05-02 08:16:19 Hello Zerblatt007

thank you for your answer.
I did change it like you write, but now is there an other failure message.


HelloWorld.pde:-1: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino\arduino-1.0\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: note: virtual size_t Print::write(uint8_t)

In print.h : 48 is to read:
  virtual size_t write(uint8_t) = 0;                // virtual size_t write(uint8_t) = 0;

regards
df0021
userHeadPic df0021
2012-05-02 08:16:19 Hello Zerblatt007

thank you for your answer.
I did change it like you write, but now is there an other failure message.


HelloWorld.pde:-1: error: cannot declare variable 'lcd' to be of abstract type 'LiquidCrystal_I2C'
C:\Progr-MCU\Arduino\arduino-1.0\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:59: note:  because the following virtual functions are pure within 'LiquidCrystal_I2C':
C:\Progr-MCU\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: note: virtual size_t Print::write(uint8_t)

In print.h : 48 is to read:
  virtual size_t write(uint8_t) = 0;                // virtual size_t write(uint8_t) = 0;

regards
df0021
userHeadPic df0021
2012-05-02 01:22:27 There is a problem in LiquidCrystal_I2C.h and LiquidCrystal_I2C.cpp because it was written for pre 1.0 Arduino:
[url=http://stackoverflow.com/questions/8749232/trouble-converting-an-arduino-library-from-arduino-0023-to-1-0]http://stackoverflow.com/questions/8749232/trouble-converting-an-arduino-library-from-arduino-0023-to-1-0[/url]

LiquidCrystal_I2C.h:
change line in these files from
virtual void write(uint8_t);
to
virtual size_t write(uint8_t);

LiquidCrystal_I2C.cpp:
change line in these files from
inline void LiquidCrystal_I2C::write(uint8_t value) {
to
inline size_t LiquidCrystal_I2C::write(uint8_t value) {

Hopefully this will be fixed in the future, but for now you have to change this yourself..
userHeadPic zerblatt007
2012-05-02 01:22:27 There is a problem in LiquidCrystal_I2C.h and LiquidCrystal_I2C.cpp because it was written for pre 1.0 Arduino:
[url=http://stackoverflow.com/questions/8749232/trouble-converting-an-arduino-library-from-arduino-0023-to-1-0]http://stackoverflow.com/questions/8749232/trouble-converting-an-arduino-library-from-arduino-0023-to-1-0[/url]

LiquidCrystal_I2C.h:
change line in these files from
virtual void write(uint8_t);
to
virtual size_t write(uint8_t);

LiquidCrystal_I2C.cpp:
change line in these files from
inline void LiquidCrystal_I2C::write(uint8_t value) {
to
inline size_t LiquidCrystal_I2C::write(uint8_t value) {

Hopefully this will be fixed in the future, but for now you have to change this yourself..
userHeadPic zerblatt007
2012-04-28 07:26:00 Hello,
my first beginning with Arduino (Itearduino) was the not succesfull.
Board and I2C-LCD are connected, I did try the sketch Hello, world. The backgrundlight is on - but the compiler shows a failure message:

c:\Progr-MCU\Arduino\arduino-1.0\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
c:\Progr-MCU\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:  overriding 'virtual size_t Print::write(uint8_t)'

After using the newest Arduino-IDE did I try an older version (...0022), but it was not better.

What can I do?

Regards
df0021

userHeadPic df0021