Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By andrept
#58173 Hello everyone,

Recently I started playing with an esp and a lcd but I can not get it to work.

First, I made this http://ediy.com.my/blog/item/133-upload ... rduino-ide and I can turn leds on and off and connect it to my wifi.
When I connect my i2c lcd 16x2 (sda=gpio04;scl=gpio05;vcc=5v), it turns one row dark and the other empty (for what i see on some videos this is normal), I upload the code but nothing works.
I tryed:
- http://www.prometec.net/esp8266-display-i2c/
- https://github.com/agnunez/ESP8266-I2C-LCD1602
- http://imaginen4tion.blogspot.pt/2015/1 ... a-i2c.html
- ...

I tested this example(https://github.com/agnunez/ESP8266-I2C- ... I2CLCD.ino) with 2 LED and one blink but the other no (maybe is too fast).

What am I doing wrong?

Thanks!
User avatar
By rudy
#58190 Do you have pull up resistors on SDA and SCL? Typically I use 4K7 but I will use as low as 2K2. They must be connected to +3.3v and not +5.

There are different I2C LCD adapter boards. There are different wiring on some. I also have some that have the same board but the chip that is on it has a different address. Check the address for the chip you are using and make sure to use that address in your code.

I know all that and when I have to recreate my environment I always have a problem finding a good library. I forget to note where I got it from. The I2C-LCD library I have on my machine at work is Library https://github.com/agnunez/ESP8266-I2C-LCD1602
User avatar
By andrept
#58201 Thank you Rudy,

The address I think is correct, my I2C board have "A0 A1 A2" with no jumper so it must be "0x27"

I am connecting my GPIO4 and GPIO05 directly on the SDA an SCL.
I will try add the pull up resistors

Thanks
User avatar
By rudy
#58214
andrept wrote:Thank you Rudy,

The address I think is correct, my I2C board have "A0 A1 A2" with no jumper so it must be "0x27"


There are two versions of the chip. One that uses "0x27" PCF8574 and the other PCF8574A "0x3F". I have had some sent with the PCF8574A and that wasn't in the listing when I bought them.

There are I2C port scanner sketches that come in handy for checking initial setup and communications.

From a web search http://playground.arduino.cc/Main/I2cScanner