I am using a 16x2 LCD to display some data for my project. I am using I2C for interfacing NodeMCU 1.0
Code is compiling and uploading successfully but it's not displaying text.
You may have a problem with the display running at 5 volts while the nodemcu runs at 3.3 volts, you should be using a level shifter.
Might be a problem with the library, there are a lot of LiquidCrystal_I2C libraries using the same file names, so hard to tell whether the one you have is compatible with a nodemcu.
Try using the hd44780 library (it should be in the library manager in the IDE), and run the FIle > Examples > hd44780 > ioClass > hd44780_I2Cexp > I2CexpDiag sketch. That will give you a lot of info in the serial monitor as well as on the LCD display.
david_2018:
You may have a problem with the display running at 5 volts while the nodemcu runs at 3.3 volts, you should be using a level shifter.
Might be a problem with the library, there are a lot of LiquidCrystal_I2C libraries using the same file names, so hard to tell whether the one you have is compatible with a nodemcu.
Try using the hd44780 library (it should be in the library manager in the IDE), and run the FIle > Examples > hd44780 > ioClass > hd44780_I2Cexp > I2CexpDiag sketch. That will give you a lot of info in the serial monitor as well as on the LCD display.
I tried changing parameters in Wire.begin() to D2 and D1 for SDA and SCL connections instead of 2 and 0. It worked for me now!
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // updated the address after scanning the I2C
void setup(){
Wire.begin(D2,D1);
lcd.begin(16, 2); // initializing the LCD
lcd.home();
lcd.backlight(); // Enable or Turn On the backlight
lcd.print("Hello World"); // Start Printing
delay(1000);
}