LCD won't display anything

I'm trying to set up some LCD's to display the data from temperature sensors. After watching this video: How to Connect an I2C Lcd Display to an Arduino Uno Tutorial - YouTube , I was able to get it to work fairly easily. But now when I try to do the exact same thing using the same board and the same LCD display. It won't display anything. The backlight turns on like it should but when I upload the sketch nothing happens. I'm using an LCD 2004A with PCF8574AT attached for my Arduino UNO.

for example this code worked perfectly fine when testing my other display

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

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup() {

lcd.begin(16,2);
lcd.clear();
lcd.print("Hello world");
}

void loop(){}

but when I run it now on a new display nothing happens. I've tried using a different board, wires, and display, and every time nothing happens. Can anyone explain why this might be happening?

LJP6955:
I'm trying to set up some LCD's to display the data from temperature sensors. After watching this video: How to Connect an I2C Lcd Display to an Arduino Uno Tutorial - YouTube , I was able to get it to work fairly easily. But now when I try to do the exact same thing using the same board and the same LCD display. It won't display anything.

This makes no sense!

ieee488:
This makes no sense!

I'm saying that I got it to work on one display and when I tried to set up another one by doing the exact same thing I couldn't get the LCD to display anything at all.

LJP6955:
I'm saying that I got it to work on one display and when I tried to set up another one by doing the exact same thing I couldn't get the LCD to display anything at all.

Are you saying you are using the same backpack on a different display, or are you saying you are using a different backpack?

If you are using a different backpack, then that can happen since not backpacks are using the same wiring between the PCF8574 and the LCD. And if the wiring or i2c address is different, when using that library, you must change the constructor parameters accordingly to match the specific backpack.

If you use my hd44780 library with the hd44780_I2Cexp i/o class, it will automatically figure out the i2c address as well as the pin mapping. This allows a sketch to work with any of the backpacks without having to alter configuration information in a constructor and recompile to deal with h/w differences between devices.

--- bill