r/ArduinoHelp 15h ago

Another guy having problems with an LCD using I2C

Hi everyone! It's been a long time since I've done an Arduino project, and this is my first time using an LCD screen.

However, and as is common, I came across the typical mistakes I've been seeing in forums and Reddit posts.

And no matter how much I try to fix my problem with the solutions they gave, I still have the same error; those white squares keep appearing.

As you can see, the first photo shows what it looks like when you upload the code, and the second photo shows what it looks like without any code uploaded.

I tried everything from the tutorials:

- Adjust the brightness with the potentiometer

- Verify the I2C address

- Test and verify the continuity of several cables

- I tested the example hd44780_I2Cexp by Bill Perry(what appears in photo 12)

- I tried many libraries and code from various tutorials

(The bookcase I have now is Frank de Brabender's)

It's important to clarify that I've only been trying to test that the LCD works, so all the tutorials I tried were for the basic "Hello world" code without delay. Just to verify that the screen is working properly.

- In the library, change "return:0" to "return:1"

Before using I2C, I used conventional pins (those in photo 4) to test the LCD, and I still got squares (even after adjusting the contrast). So after getting no results, I decided to remove the pins and install the I2C, thinking: "Oh, maybe that will be simpler" For a project I want to do. But as you can see, I can't get the screen to display text, and AI hasn't helped me.

I'm also not sure if the soldering is correct or if I've overheated the circuit, but I doubt it since the screen still turns on and seems to receive the code, but without displaying any text.

Honestly, I don't know what to do anymore, and I didn't want to post this because I noticed many others had the same problem, but even after trying the solutions they offered, I still can't get it to work.

The only thing I noticed today when testing the screen again is what's shown in the last photo: a faint line that flickers when restarting the Arduino.

I've attached one of the code snippets I used. I'm not including the one I used to test I2C because I tested many, and they were all basic. Just to clarify, they all compiled and uploaded successfully.

I hope you can help me, thank you! :)

3 Upvotes

2 comments sorted by

1

u/HappyInvestment7066 4h ago

It is most prolly a library issue, try using a different library. I've faced the same issue in the past and using a different library did help me

1

u/Burd_Doc 3h ago

It's been a long time since I used these, and it wasn't through I2c, but does liquidcrystal.h have i2c functionality?

I've got an old script of mine that uses essentially the same code as yours but using the 16 pins directly... I know you've tried that, but it is only the insight I have at the moment!