I2C Serial Display

Hi,

I am going insane here!!!

I had an issue with my Mega + I2C Display (Funduino LCM1602) where a sketch would not upload, after many hours of frustration that turned out to be due to !!! being used in one of my print routines. Three exclamation marks cause it to timeout when uploading! "Go figure that..."

New problem...
In trying to solve that issue I upgraded my arduino system to latest version ond now find the display will not print more than one char.

I am now aware of this bug in the existing librarries but can someone PLEASE tell me how to get the correct library file and a sample sketch for this display would be wonderful, I have tried 5 different new libraries and none of them work.

Even the example sketches compile ok, upload to mega ok but display does not show anything.
The display is still wired how it was before when it WAS working (before upgrade)

Any help appreciated.

There was a change to how print worked somewhere in 1.6.x - get a recently updated LiquidCrystal_I2C library.

The key change is in the write method:

You have something like this in LiquidCrystal_I2C.cpp in the library :

inline size_t LiquidCrystal_I2C::write(uint8_t value) {
	send(value, Rs);
	return 0;
}

It needs to be:

inline size_t LiquidCrystal_I2C::write(uint8_t value) {
	send(value, Rs);
	return 1;
}

Issue with the !!! is a bug in the bootloader which was fixed a while ago. It can be fixed by re-burning bootloader (but that's slightly harder on the mega2560 - not all programmers work, because of the near/far program flash separation. I haven't done much with large chips though, so you'll need to wait for someone else for that)

Sorry, cant find that line anywhere in the .cpp file?

I have however managed to get it working, I think I may have had clashing library files in the directory as once I deleted all the old ones it seems to work.

Thanks for your help anyway.