LCD doesn't display characters

Hi All,

I need help please

I'm using LCD 16x2 + PCF8574AT and NODEMcu ESP8266 12-E

and I used the library Newliquidcrystal_1.3.5

The Problem is : the only commands that running are : ( back light off and delay then on )

lcd.setBacklight(LOW); // Backlight off
   delay(500);
   lcd.setBacklight(HIGH); // Backlight on
   delay(1000);

I tried about 10 different libraries and sketch but print doesn't display anything

The connection :

GND ..> GND
VCC ... > vin
SDA ... > D2
SCL ..> D1

and the following is my code

#include "Wire.h" // For I2C
#include "LCD.h" // For LCD
#include "LiquidCrystal_I2C.h" // Added library*
//Set the pins on the I2C chip used for LCD connections
//ADDR,EN,R/W,RS,D4,D5,D6,D7
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7); // 0x27 is the default I2C bus address of the backpack-see article

void setup()
{
   // Set off LCD module
   lcd.begin (16,2); // 16 x 2 LCD module
   lcd.setBacklightPin(3,POSITIVE); // BL, BL_POL
   lcd.setBacklight(HIGH);
}
void loop()
{
   lcd.home (); // Set cursor to 0,0
   lcd.print("protolabz"); // Custom text
   lcd.setCursor (0,1); // Go to home of 2nd line
   lcd.print(millis());
   delay(1000); // Blinks of backlight
   lcd.setBacklight(LOW); // Backlight off
   delay(500);
   lcd.setBacklight(HIGH); // Backlight on
   delay(1000);
}

Here's a tip.

You are doing the programming version of aiming at a moving target. When trying to troubleshoot an LCD program you should write something to the display in setup() and then don't try to change it in loop().

In other words loop() should be empty ... nothing between the { } brackets.

Don

Are you sure of the I2C address of the LCD? There is another default address used by those I2C displays. It is 0x3F.

To check the I2C address and if the LCD is communicating with the I2C bus, run the I2C scanner.

// I2C scanner by Nick Gammon.  Thanks Nick.

#include <Wire.h>

void setup() {
  Serial.begin (115200); //*****  make sure serial monitor baud matches *****

  // Leonardo: wait for serial port to connect
  while (!Serial) 
    {
    }

  Serial.println ();
  Serial.println ("I2C scanner. Scanning ...");
  byte count = 0;
  
  Wire.begin();
  for (byte i = 1; i < 120; i++)
  {
    Wire.beginTransmission (i);
    if (Wire.endTransmission () == 0)
      {
      Serial.print ("Found address: ");
      Serial.print (i, DEC);
      Serial.print (" (0x");
      Serial.print (i, HEX);
      Serial.println (")");
      count++;
      delay (1);  // maybe unneeded?
      } // end of good response
  } // end of for loop
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
}  // end of setup

void loop() {}
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);

Are you sure of the I2C expander (backpack) to LCD wiring? Not all backpacks are wired the same.