I2C LCD only prints first character of the string_2017

Searching the forum it seems this has come up before. Not sure if I should create a new topic but since it had been some time I did. The issue seems to be with newer versions of the IDE and some of the LCD libraries .

I am using LiquidCrystal_I2C.h package version 1.1.2

I found that similar to other posts in the forum that the issue of only printing one character was still a problem. I found if you change the change the LiquidCrystal_I2C.cpp file, lines 18-21 as below (changed function so it was not a void, and added the return 1 line):

#define printIIC(args) Wire.send(args)
inline LiquidCrystal_I2C::write(uint8_t value) {
send(value, Rs);
return 1;
}

This seems to work. I was able to run the example code 'HelloWorld' in the library directory with some tweaks to fit my smaller 16x2 screen.

See:

The LiquidCrystal_I2C 1.1.2 code in the library manager should work correctly "as is" with the Arduino IDE.
pre & post 1.0 IDE versions.

How are you building your code? What tools & what board type?
Something must be going wrong with your build tools or you have a core platform recipe issue.

The code you modified is for pre 1.0 versions of the IDE where write() did not return values.
The only way the code you modified gets used is if ARDUINO is not defined or is less than 100
If the value of ARDUINO is less than 100, then write() has no return value and if you try to return something, the code would not compile.

If you would like to try another backpack library that auto detects everything, you could try my hd44780 library package. It is available in the IDE library manager.
You can read more about it here: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library
--- bill

Bill:

Thanks. I reinstalled the 1.8.2 IDE and the driver for arduino mega. My guess is reinstalling the driver did it.

I am using windows7 and the 1.8.2 IDE to compile code. I looked over the source code of library
but i could not follow it as I am new to programming. Thus my tinkering.

Matt