I2C LCD(16,2) not displaying text

Hello I'm trying to print " Hello World" on my LCD but it's not working
the LCD is on but there is no text, I tried adjusting the potentiometer behind but with no results
the pins are attached correctly to the Arduino UNO
GRND to GRND
VCC to 5V
SDA to A4
SDL to A5
I ran the hd44780 so I know that the pins and address "0x27" is correct

Note that my I2C pins are not yet soldered to the LCD im trying to make it work before soldering them just in case the i2c is not working or i need to replace something

The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

Solder the backpack onto the LCD. Ask a neighbour if you don't have a soldering iron.

Alternatively, buy an LCD with the backpack already fitted.

David.

1 Like

could it be because of the soldering? i thought that i can make it work without soldering just to test it then i can solder it when it work

You mean of the non-soldering or poor soldering? Definitely.

yes thats what i mean because i thought that i can work even without soldering but i guess i was wrong ?

Certainly were! :astonished: Electrical circuits require the conductors to actually be physically connected together.

Next, connect only 5 V and ground to the backpack and adjust the contrast control until you clearly see a row of "blocks" on the upper line of the display.

Then connect SDA and SCL and using the $D44780 library test, you should see your display.

If you need to show code, post the code itself according to the forum instructions using the </> widget, not a picture of your screen.

It is possible to make it work. I've done it for testing occasionally, but I wouldn't recommend it as it often has issues.
In order to make it work, you have to put pressure on the backpack by holding the backpack at a slight angle so it puts pressure on all the pins in the holes on the LCD module.
12 of the 16 pins must make contact to work.
The only pins that don't need to make connections are LCD module pins 7,8,9,10 which are DB0, DB1, DB2, and DB3

I would recommend that you install the hd44780 library and run the included I2CexpDiag sketch to test everything.
It can test connectivity to the backpack when it is not connected to the LCD.

The I2C LCD backpacks are quite simple devices and very rarely have issues.

--- bill

I was carefully avoiding that suggestion. :woozy_face:

after soldering the backpack the lcd seems to work but the probleme now it display only the first letter on the screen,
lets say in the code i use lcd.print("Hello, world!"); but in the screen it only display H

For all we know you are positioning the cursor wrongly but without seeing you code, who knows

Post your full sketch

The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

Only being able to print the first character of a string is an old issue going back 5 or so years that was fixed way back then.
It is from using an old LiquidCrystal_I2C library with a hidden bug in it that shows up on more recent IDEs. (more recent being in the past several years)

My recommendation, is use libraries from the IDE library manager rather than ones downloaded from some web site. This is particularly true with the LiquidCrystal_I2C library as there are so many different versions floating around out there.

But even if you get LiquidCrystal_I2C from the IDE library manager. The library is no longer maintained and hasn't been for a few years. There are some current issues in it that need to be fixed and the guy that took over the source code copied it from the github repository (the one that the IDE uses) to another git repository. Then he tried to illegally change the s/w license and copyright on the new repository. I called him out on it, he then deleted it, but has abandoned the code on github.
He now no longer responds to any of my emails.
This leaves the LiquidCrystal_I2C library that is being used by the IDE in limbo with some issues, including one that causes the IDE to grab an incorrect version of the library.

I would recommend using the hd44780 library with the hd44780_I2Cexp i/o class.
Install it using the IDE library manager.
After installing, spend at least a few minutes reviewing the included documentation, (there is quite a bit) then run the included diagnostic tool, I2CexpDiag, that it comes with to verify that everything is working.
After that, you can look at an run any of the many included examples in the hd44780_I2Cexp i/o class.

--- bill

it worked thanks everyone !!!

And just to be clear, what worked for you was in fact the HD44780 library?

At first, after soldering the I2C backpack to the LCD it started working but it only showed the first letter of the text display, I heard that the problem might be related to the version of the library so after I updated the liquidCrystal_I2C library it worked normally !

Do yourself a favor and install and use Bill Perry's hd44780 library. It is a much better library than any of the LiquidCrystal libraries and is actively maintained, unlike those other libraries. Install the hd44780 library through the IDE library manager.

thank you will try that for sure !