My LCD I2C isn't showing any texts

I'm using a I2C lcd 16x2 with a PCF8574 I2C adapter. i've soldered the adapter correctly and used jumper wires to connect it to my Arduino Uno. the software sees the lcd and turns it on, but it isn't showing any text just white cubes on the top row. I've tried adjusting the potentiometer on the back, still the same. change the address from 0x27 to 0x3F, still nothing.

i'm new to this forum so it would be helpful if someone could guide me to this

Welcome to the forum

Try running the I2C scanner example from the Wire library. Does it find the display and if so what is its address

Do the “cubes” change when you change the test that you print?

it says "I2C device found at address 0x27 " but earlier when i tried using that address on my code, it didn't show any text

About that code…

wait i'll show you

Don't forget to use code tags when you post the sketch

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

LiquidCrystal_I2C lcd(0x27, 16, 2);

int tiltPin = 2;
int ledPin = 7;
int buzzerPin = 8;

int tiltState = 0;

void setup() {

  pinMode(tiltPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(buzzerPin, OUTPUT);

  lcd.init();
  lcd.backlight();

  lcd.setCursor(0,0);
  lcd.print("System Ready");

  lcd.setCursor(0,1);
  lcd.print("Slope Stable");

  delay(2000);
  lcd.clear();
}

void loop() {

  tiltState = digitalRead(tiltPin);

  if (tiltState == HIGH) {

    digitalWrite(ledPin, HIGH);
    digitalWrite(buzzerPin, HIGH);

    lcd.setCursor(0,0);
    lcd.print("WARNING!");

    lcd.setCursor(0,1);
    lcd.print("LANDSLIDE!");

  } 
  else {

    digitalWrite(ledPin, LOW);
    digitalWrite(buzzerPin, LOW);

    lcd.setCursor(0,0);
    lcd.print("System Ready ");

    lcd.setCursor(0,1);
    lcd.print("Slope Stable ");

  }

}

there are other components that i was tinkering with a tilt sensor module, led, and a buzzer. but those things worked with this code, my only problem was that the LCD wasn't showing any texts whatsoever, just these white cubes. i removed the other components cause ive tried troubleshooting the lcd alone



Are those connector pins rusty?

Possible shorts?

yes the connector pins are quite rusty, but the solder aren't connected with each other.
hopefully the rust isn't the problem here :cry:

Rust is not a good conductor.

so is the adapter the problem to this? is there anyway to fix that :frowning:

  • Since the I2C scanner worked, and the display obviously has power, the cabling is okay.
  • Triple check the soldering, try a different display.

@tinkerbro - "re-flow" the solder.

Those solder joints are really terrible.
Whoever did them (you?) didn't know that you need to heat both the pad (circuit board contact) and the pin, then after a few moments apply the solder making sure it properly covers both the base and the pin.
Just follow this:


Try going over all the solder joints, hoping that nothing is damaged or that there are no short circuits.

I would recommend installing and using the hd44780 library and the hd44780_I2Cexp i/o class.
It has support for this h/w. It will auto locate the i2c address and will auto detect the pin mappings between the PCF8574 pins, and the backlight activation level.
It also includes a diagnostic sketch tool to test the i2c signals, and the LCD hardware if it doesn’t “just work”.

It can be installed using the IDE GUI using the IDE library manager.
It comes with lots of examples and extensive documentation.
Here is a link to the github page:
https://github.com/duinoWitchery/hd44780

And a link to the wiki:
https://github.com/duinoWitchery/hd44780/wiki

You will need to use the hd44780_I2Cexp i/o class.

I would highly recommend that you read the main wiki and then the wiki page for the hd44780_I2Cexp i/o class before attempting to use the library as this library supports multiple h/w interfaces (i/o classes) so you have to pick and use the correct one for you hardware (hd44780_I2Cexp in you case).
The wiki explains the layout of the library and where to find the examples including the diagnostic sketch.

If the hd44780_I2Cexp i/o class doesn’t “just work” then post the output from the diagnostic sketch and I can walk you through some things to look at to try to get it up and working.

– bill