LiquidCrystal_I2C.patch - ska-la/arduino_patches GitHub Wiki
PREREQUISITE. Now I see many various repos on GitHub with LiquidCrystal_i2c library realization. In spring of 2013 i bought first LCD 16x2 with I2C/TWI interface (with I2C address 0x27) for Arduino project. I didn't use GitHub at that time. eBay seller provided a reference on the LiquidCrystal_i2c library. I tested it, but got nothing. LCD was putted aside. A month later i bought another LCD 20x4 with I2C/TWI interface (with I2C address 0xA0) and tested him with same library and result. More month later i commenced to burrow the problem and fixed it after some days. Both LCDs have had PCF8574P chip on I2C/TWI interface boards, which had slightly different a circuit layout of the genuine library based. As result the patch was borned. After the patch was applied I got two working LCDs.
ESSENTIAL. On *nix
simply download the genuine library and unpack it to sketchbook/libraries/
cd ~/sketchbook/libraries/
mkdir LCD_I2C
cd LCD_I2C
unzip ~/Downloads/LiquidCrystal_I2C.zip .
then download and copy the patch to sketchbook/libraries/ and apply it:
cd ~/sketchbook/libraries/
copy ~/Downloads/LiquidCrystal_I2C.patch .
cd LCD_I2C
patch -p1 < ../LiquidCrystal_i2c.patch
HOWTO. After that, simply use one of the library's examples or include the library at begin of your sketch:
...
#include "LiquidCrystal_I2C.h"
...
void setup() {