I2c Lcd Issue (emergency pls)

Okay, I've been reading and reading and there is no solution for my problem. Please I need help really quickly.

I am trying to make this Lcd 16x2 work with the i2c and Arduino UNO, I tried with a lot of libraries and with all of them I have the same problem (using the Hello world example codes), the lcd shows this black blocks on the first row (and I cant turn on the backlight tho idk)

My connections:

I2c Vcc - 5 V Arduino
I2c Gnd - Gnd Arduino
I2c SDA - A4 Arduino
I2c SCL - A5 Arduino

I2c's led its ON, Arduino's leds are ON, LCD its ON showing the blocks (without the backlight)
By the way sorry if my english its not that good.

One of the examples codes from librarie "hd44780" by Bill Perry
I tried this librarie because i saw that work in other post but now its not :frowning:


#include <Wire.h>
#include <hd44780.h>                       // main hd44780 header
#include <hd44780ioClass/hd44780_I2Cexp.h> // i2c expander i/o class header

hd44780_I2Cexp lcd(0x27); // declare lcd object: auto locate & auto config expander chip

// LCD geometry
const int LCD_COLS = 16;
const int LCD_ROWS = 2;

void setup()
{
int status;

	// initialize LCD with number of columns and rows: 
	// hd44780 returns a status from begin() that can be used
	// to determine if initalization failed.
	// the actual status codes are defined in <hd44780.h>
	// See the values RV_XXXX
	//
	// looking at the return status from begin() is optional
	// it is being done here to provide feedback should there be an issue
	//
	// note:
	//	begin() will automatically turn on the backlight
	//
	status = lcd.begin(LCD_COLS, LCD_ROWS);
	if(status) // non zero status means it was unsuccesful
	{
		// hd44780 has a fatalError() routine that blinks an led if possible
		// begin() failed so blink error code using the onboard LED if possible
		hd44780::fatalError(status); // does not return
	}

	// initalization was successful, the backlight should be on now

	// Print a message to the LCD
	lcd.print("Hello, World!");
}

void loop() {}

Post an image of your setup. Post a code that does not work. Post a schematic.

1 Like

Have you tried adjusting the contrast pot?

1 Like

Yes, I tried. It doesn't change anything.

It does not change the appearance of the blocks?

1 Like

No, It doesn't.

Well, that is unusual. By adjusting the contrast pot you should be able to make the blocks disappear and re-appear.

Is that what you are adjusting?

1 Like

As was asked by @Idahowalker in reply #2, please post clear photos and a schematic of your setup.

Yep.

Yep, what?

1 Like

Sorry. Yep, that was the pot I was adjusting.

Please.

Do not specify the I2C address. The hd44780 library automatically determines the I2C address and the I2C backpack to LCD pin mapping.

Just use:
hd44780_I2Cexp lcd;

1 Like


Yes, I am mess. I know.

And I already done that.

I wish that you would have posted the photo when first asked. We would have saved a lot of time answering your urgent question.

The backpack is soldered on backwards. It must be turned around. See the photo in reply #7.

2 Likes

If I soldered that way, there is a short-circuit and the Arduino doesn't turn on

The backpack is backwards. The LCD cannot work with the backpack connected backwards. Those are facts.

I do not know what would make it look like a short. I do not know what you did. I do not know what you saw.

1 Like

I connected all exactly the same. I didnt change any connection. But when I connected the Arduino to the PC and to the I2c, the Arduino's leds didn't turn ON, but when I disconnected the I2c they do
idk if I explain myself

My best guess is that there was a solder bridge between pins 1 and 2 of the LCD. Those are Vcc and ground. A tiny solder bridge can conduct enough to overwhelm the regulator and the Uno shuts down. How good are you at soldering? How carefully do you examine your solder joints? Do you know what to look for?

1 Like

Ush... Maybe that was the problem. But Im sure I'm sure I checked more than once every solder. I will try to solder back the right way and see if work like that.