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.
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:
}
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.
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.
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)