'Nodemcu 8266 has not display text on LCD

I am using nodemcu esp8266 with LCD for the first time and I'm unable to make it work. It lights the background but it does not show any text.

LCD Address: 0x27 sda: d4 sdl: d3 vnn: vin gnd: gnd

Code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

//Set LCD Address 0x27 for LCD1602 (16 chars 2 line display)
LiquidCrystal_I2C lcd(0x27, 16, 2);


void setup() {
  // put your setup code here, to run once:

  lcd.begin(0,2);  // SDA-0 (GPIO D3 = 0), SCL-2 (GPIO D4 = 2)  

  lcd.backlight();

  lcd.print("Hello world");

}

void loop() {

}


Solution 1:[1]

I changed the library from the original to https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library LCD can display text.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jatuporn Jirundorn