
The new NOPO board is a modular controller for home or industrial automation.
LiquidCrystal_I2C.h library – for Arduino IDE 1.6.x
This library is a modified version of the H. Mario LiquidCrystal_I2C V.2.0 lib. We fixed a function in LiquidCrystal_I2C.cpp in order to allow it working with Arduino IDE 1.6.4, 1.6.5, 1.6.6, 1.6.7 and the latest 1.6.8 revision.
Download
If you want to download the whole library in a .zip file, you can do it clicking on the link below:
LiquidCrystal_I2C.h / LiquidCrystal_I2C.cpp with corrections
You also can read the following brief explanation, it could be interesting.
Where did we gather the information?
Following the valuable informations provided by this Arduino Forum’s post we found where and how to fix the problem about an incorrect printing way on our LCD board. Same problem has been noticed from many users with as many solutions, with 95% of wrong instructions and sci-fi answers. We published our solution here because it works perfectly with our I2C PCF8574 LCD Board. We suppose that our fix is the same made by Marco Schwartz. You can optionally download Marco’s good job here.
How did we fix the problem?
Even though it looked like a vertical wall to be climbed by bare hands, mainly because of the plethora of results provided by Google to be inspected before finding any useful link, the solution was simple and simply deployable. To do this you must open LiquidCrystal.cpp with a text editor and edit this function:
inline size_t LiquidCrystal_I2C::write(uint8_t value) { send(value, Rs); return 0; }
as follows:
inline size_t LiquidCrystal_I2C::write(uint8_t value) { send(value, Rs); return 1; }
Et voila. A big problem with a tiny, cute solution.
Happy with this solution?
Please consider visiting our website, eventually testing our flagship product Archiduino or getting in touch with us for more information!
Any help in spreading the word about Archiduino system will be much appreciated! Thank you by Seletronica.
Great , well done, clapping to you.
Greetings from Italy
Stefano
Thank you Stefano! (We’re in Italy too)
Awesome. I think I was wandering around the net for quite a while searching for a viable I2C solution. Now on to the next step in the project!
Thank you AC.
Please, let us know how your project went.
thank you very much
we’ll finally be able to continue to create
Happy to help, Mullroy. You’re welcome.
i try all the library, only this work , thanks
You’re welcome, Theo. We found a lot of potential solutions before meeting the right, definitive code. After the IDE 1.6 “revolution”, our LCD Board seemed to work in specific conditions only, and that wasn’t the right way to offer a commercial product. Whew! These tips saved us, so we felt compelled to share them.
I just added “return 1;” in LiquidCrystal.cpp and everything went back to normal. I use Arduino IDE 1.8.5. Thanks for this great tip.
You’re welcome, Evangelista Torricelli (what an important name! Is it a nickname only? I’m curious…)
As said, the solution was found by others (unlikely, I can’t back to original discoverer). We just take credit for have found it in a bunch of garbage posts across whole Internet! (btw, what an amazing journey!)
Thank you very much!
I use Arduino IDE 1.8.9
An elegant solution to the many controversial solutions. Another problem that I think needs a solution and the is the LCD cursor position. The ability to address the register to move the cursor right or left is access with a LCD.write, which is part of the LiquidCrystal library, should function. I have been working on that to no avail. The code for left and right cursor movemeni is contained in the Hitachi spec sheet and could be sent to the LCD. If that were true, then a character could be inserted into any cursor position on a given line before a lcd.print command. Would be interested to
help if I could. This would be a big addition to the LCD use.