LCD 16 x 2 I2C connect with Arduino UNO

Been having trouble connecting my LCD 16 x 2 I2C screen to my Arduino UNO, not really the connecting part. That went just fine, yesterday i connected it to my UNO and it kind of worked, the backlight lit up but it didn't display text also i couldn't find the I2C address through a scanner. Today i hooked it up to resume my quest to get the LCD screen to work, and when i plugged it in the same way it doesn't give backlighting. All I see is the upper character boxes slightly. I would love if i could get it to work, does anyone know what to do?



In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.

  • Does a 2nd LCD work ?
  • Try different wires.

Have You tried to change the blue pot for contrast?

I didn't use any code, only for the I2C scanner from 3 different libraries, and followed a YouTube video on how to create your own.

I do not have a 2nd LCD so I can't test this.
I haven't tried using different wires yet but I will tomorrow

I have, that's how the character boxes appeared.

Okey. That's too much contrast. Lower it a bit. Else it might hide a text.
Just for a test, print something on the second line too.
However, no backlight sounds worrying but to create the boxes there's voltage. Check the wires and 5 volt at the display.

Try connecting the I2C wires to A4 (SDA) and A5 (SCL).

For an I2C LCD display to work, the I2C address and the I2C backpack to LCD pin mapping must be correct. If the library default settings for either or both are not correct the LCD will not work. You can try to figure out the right pin mapping and use an I2C scanner to find the address, but if you install and use the hd44780 library that is done automatically by the library. The library is available for install with the IDE library manager.

The class that you want to use is the hd44780_I2Cexp class. There are examples to show how to use the library. The nice thing about the hd44780 library is that it will autodetect the I2C address and the I2C backpack to LCD pin mapping. The hd44780_I2Cexp class wiki.

In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results.

If I put my finger on the last pin of the display itself the backlighting gets brighter, same goed for the metal part where the piece of plastic is connected in the bottom left of the 3rd picture.

I'll try that as soon as I can and post my results in the thread

What pin is that? Its designation please.
Somewhere a wire is not doing its job.
As I remember there is a strap involved in the backlight. Has it fallen off?

@groundFungus tip is really good! I got it in the past and I've been using it in quite a number of projects. Use it! Diagnostics is new to me. Never needed it so far.

The pin I mean is the ABLK pin. No I put the cover over those two pins on the left side of the I2C, also switched them around.

Sorry but it tells me absolutely nothing because I'm not looking over Your shoulder. Out on travel, no display is available to have any idea.
ABLK pin? Can't remember seing such a pin.
For the other pins, please read their designations.

I think that the ABLK pin is the backlight anode pin on the connector (strap for backlight).

What does this mean? I checked the solder connections from the display to the I2C, they all seemed to be fine.

There should be a little, usually black, thing, in place to lit the backlight up. Or the pins can be wire wrapped.

EDIT. If You cut power, cuts of the blinding red LED and show a close picture of the back side of the backpacked I2C things might be found.

That makes sense!

Post your code ( in code tags) and draw the circuit (no fritzing) showing what connects where, what power supply etc. etc.

IF you cant find address, check the +5V, GND´, SDA and SCL wires first.
If no addr, with scanner, your chip PCF.... may be bad.

Run the I2CexpDiag sketch in the hd44780 library hd44780_I2Cexp i/o class.
And post the output here if it isn't working.
--- bill

1 Like