-->
Page 1 of 2

lcd 20x4 i2c on NodeMcu

PostPosted: Fri Jun 14, 2019 5:03 am
by Luxfire
Hello Guys,
i cant show anything on lcd by i2c. my conections: SCL -->D1 SDA -->D2 .
There is some data flow between nodemcu and lcd, i've checked it with osciloscope. nodemcu also can dim the backlight of lcd and turn it on again, so i think it works? but i can't achieve showing any text. also contrast was checked with multimeter if the potentiometer works. Have You some ideas what could have gone wrong?
Code: Select all#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
Serial.begin(115200);
//Use predefined PINS consts
Wire.begin();
lcd.begin();
lcd.noBacklight();
lcd.home();
delay(200);
lcd.print("Hello, NodeMCU");
lcd.backlight();
}

void loop() { // do nothing here
  }

Re: lcd 20x4 i2c on NodeMcu

PostPosted: Sun Jun 16, 2019 3:43 am
by schufti
beware: i2c address depends on what chip is used on the interface board!
PCFxxxx with or w/o suffix "A"

Re: lcd 20x4 i2c on NodeMcu

PostPosted: Mon Jun 17, 2019 9:14 am
by Luxfire
i've got PCF8574T chip on LCD. Before this code i also uploaded i2c scanner, also if i change address from 0x27 to 0x17(just random address) lcd backlight won't off/on anymore. so i'm sure(?) that 0x27 is my lcd address.

Re: lcd 20x4 i2c on NodeMcu

PostPosted: Wed Jun 19, 2019 7:49 am
by QuickFix
Just a wild idea: have you verified that the LCD-library you're using is ESP8266 compatible?

Not all (in fact most) libraries for hardware is written with the Arduino (ATMEGA) in mind and are not 100% compatible with the NodeMCU (ESP8266).