1602 LCD display with I2C module not working

Hi,

I have been constantly trying to print some message on 1602 LCD integrated with I2C module ; however sketch is getting uploaded every time but there is no message display at LCD. Please help me out. For reference I`m attaching sketch.

#include <LiquidCrystal_I2C.h>

#include <Wire.h>
LiquidCrystal_I2C lcd (0x22, 16, 2);

void setup() {
// put your setup code here, to run once:
//lcd.begin();
lcd.init();
lcd.backlight();
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Hi");
}

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

LiquidCrystal_I2C lcd (0x22, 16, 2);

How did you determine that the I2C address is 0x22 ?

via I2C Scanner.

You are clearing the LCD each time through loop(). Do that once in setup()

did that but usual response.

Has the I2C module got a contrast pot on it and, if so, have you tried adjusting it ?

The contrast pot will be on the back if you have one

i have already adjusted through that pot but every time i`m getting the same response

Aside from trying the scanner again or trying the address from the documentation, if there is one, I can only think of trying to avoid looping anything you don't need to and run it like this.

#include <LiquidCrystal_I2C.h>

#include <Wire.h>

LiquidCrystal_I2C lcd (0x22, 16, 2);

void setup() {
  // put your setup code here, to run once:
  lcd.init();
  lcd.backlight();
  lcd.clear();
  lcd.setCursor(0, 1);
  lcd.print("Hi");
}

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

Edit: You could also try what was done here.

Hello ankitaerialiq
Check all the solderings.

Have a nice day and enjoy coding in C++.
Дайте миру шанс!

I only use this lcd library, which installs from the ide library manager (hd44780.h) and which finds the address by itself and has various diagnostics. By far, the easiest way to run lcds.

i have checked them through multimeter (short circuit) ; all are connected .

I tried this too but got no better response.

Those solder joints look very suspicious. I would expect to see a complete circle of solder around each pin rather than just on one side and may of the joints look dry. Can you remake the joints using extra flux over an above what is in the solder ?

They barely look soldered in that picture. Even if you don't have a short/have a connection on each pin it might not be a good connection and could cause problems.

sure will check that.

The I2CexpDiag sketch included in the hd44780 library hd44780_I2Cexp i/o class will test the h/w and report any issues it detects.

From the photo, it sure looks like there are soldering issues.
It could also be that the LCD backpack is not the backpack supported by the LiquidCrystal library.
(The hd44780 library supports all the backpack designs)

--- bill

@ankitaerialiq
If worse comes to worse, don't trust the I2C scanner...
You can try changing the address to 0x27, see if that works.