-->
Page 1 of 3

LiquidCrystal_I2C Example

PostPosted: Sat Apr 04, 2015 7:33 am
by penatenjoe
Attached the code for an example which shows the use of one of the LiquidCrystal_I2C library which can be found in https://github.com/fdebrabander/Arduino ... 2C-library.
Note that the statement Wire.pins has to be added as mentioned in the wiki - this is the only change needed.

Re: LiquidCrystal_I2C Example

PostPosted: Sat Apr 04, 2015 11:06 am
by penatenjoe
I forgot to mention that many LCDs do not work with 3V3 but rather with 5V. My LCD does and in addition has 4k7 pullups to 5V for SDA and SCL. I was concerned that this might damage the pins of the ESP8266 which are not 5V tolerant. Therefore I used a level shifter for both signals . Question to the experts: is that neccessary or is the current too small to cause damage?

Re: LiquidCrystal_I2C Example

PostPosted: Sat Apr 04, 2015 5:03 pm
by erniberni
Which pins do you use for SDA and SCL?
I can't find any docs about i2c and Arduino IDE ?

I added
Wire.pins(0, 2);
to my sketch. I tried the I2C Scanner of Nick Gammon but Output was nonsense

Regards Reinhard

Re: LiquidCrystal_I2C Example

PostPosted: Sun Apr 05, 2015 5:19 am
by penatenjoe
I was using an ESP201 and GPIO13 and 14. On my chip GPIO02 doesn't do anything even with the Blink example in the Arduino examples collection (maybe I fried it?)
The original documentation: http://www.arduino.cc/en/Reference/Wire
Following your hint I tried the I2C scanner (see http://playground.arduino.cc/Main/I2cScanner) but interestingly enough it finds a device under all adresses even with nothing connected to the IO pins. The same code with an original Arduino works just fine. Maybe a bug in the ESP8266 port of the library?