LCD not showing the text

Im trying to test my LCD, but after the code is uploaded, the screen just lights with no text.

Heres my code
EDIT: Im new at this. Im using an Arduino Uno. I was going with this tutorial

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

#define I2C_ADDR 0x27 //Define I2C Address where the PCF8574A is


#define En_pin 2

#define Rw_pin 1

#define Rs_pin 0

#define D4_pin 4

#define D5_pin 5

#define D6_pin 6

#define D7_pin 7
LiquidCrystal_I2C lcd(I2C_ADDR, En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup() {
  // put your setup code here, to run once:
lcd.begin(16, 2);
lcd.print("work, blt");

void loop() {
  // put your main code here, to run repeatedly:

I attached a picture, of the wiring. The pins connected to the breadboard are for ultrasonic sensor, as my main goal is to show the distance in the screen. I have the code for that, but the screen stays the same as now.

I was thinking, maybe I need connect it to a potenciometer to change the contrast, but i cant even see anything without it. Maybe my wiring is completely off

There is no picture attached ..
Did you:

  1. solder the I2C adapter (or was it already soldered to your LCD?) / wiring yourself and are you skilled in soldering?
  2. did you check the right address of the I2C adapter with an I2C scanner?
  3. what library do you have installed?
  4. did you turn the contrast potentiometer on the back of the I2C adapter?

Have a look at:
to make sure that you have used the suitable constructor for your I2c adapter.

1.It is soldered to my LCD
2.Yeah, I scanned and got the address.
3. Now, I have the NewLiquidCrystal 1.3.4
4. Now i turned it on, and all I can see is first row full of white rectangles.

I tried the same code, at the link you shared. Also tried to CONNECT SDA and SCL to A5 and A4, even tho my UNO has separate SDA and SCL place to connect

Did you run the diagnostic sketch I pm’d you about?

  1. Now, I have the NewLiquidCrystal 1.3.4

Fine ->
0. Did you delete all of the other LCD library stuff on your PC? (This is very important, so that your compiler only has the chance to use the new library.

  1. Contrast potentiometer doesn't change anything? (Just to be sure ..)
  2. Did you check, what type of I2C adapter you have (I posted the link to the wiki in my previous post)?
  3. Did you make sure, once having detected your type of adapter, that you used the adequate constructor, or
  4. did you just use the same sketch as before and the only change was installing the NewLiquidCrystal 1.3.4 ?

-> normally when you see the first row full of white rectangles something is still wrong with the constructor.

Everything works now, using different library. Still, it would be useful to figure out, why it did not work with the LiquidCrystal library. Ill try to write a complete new code tomorrow.

Im new at this, but Im slighty getting a hang of it, bit by bit.
Thank You for your help so far

Everything works now, using different library. Still, it would be useful to figure out, why it did not work with the LiquidCrystal library

I still suspect you used the wrong constructor with the right library :slight_smile:
(the NewLiquidCrystal library is my favourite and I got ALL of my different lcd displays and I2C backpacks working with exactly that library).

If you use an lcd display you have to match the right library with the right constructor.

You can't just copy and paste a code incl. a constructor which has been created for another combination of library and lcd. The constructor tells the arduino which pins are communicating with each other or have function x or y. So if your constructor tells the arduino to send data to LCD pin x but in fact it addresses y - that won't work. So you see, everything has to match exactly.

In the link which I posted, the most common I2C backpacks are described and pictures shown to identify your own. And you will see that the correspondent constructors are not the same as they distinguish from each other taking into account the pin pairs to be linked.