Displaying text on nodemcu

Hi! I have recently got a nodemcu v3 and a 16x2 lcd display with IC2 . I have written a code to display text on the display and its not showing . I have connected the SCL to D6 and SDA to D3. This is my code

#include <LiquidCrystal_I2C.h>

#include <Wire.h>


LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {       
  Serial.begin(9600);
  Wire.begin(D6, D3);
  lcd.init();                      
  lcd.clear();
  lcd.backlight();
  lcd.setCursor(0, 0);  
  lcd.print("test");
}

void loop() {

}

someone please help

Have you already run the I2C scanner to certify that the I2C module is communicating with the node, and what is the address of your module?

" I2C address scanner Arduino (ESP8266) sketch · GitHub

You informed that you called:
SCL to D6 and SDA to D3.
But in the code it looks like this: Wire.begin(D6, D3);
wire begin is like this: Wire.begin(SDA, SCL); ,
Ref: "Libraries — ESP8266 Arduino Core 3.1.2-21-ga348833 documentation
So you are swapping SDA with SCL in your project.
Correct: Wire.begin(D3, D6);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.