LCD display not working with the HW-061

hi I soldered the HW-061 onto my LCD screen and after connecting it to the pins +5, GND, A4, A5 on the Arduino and uploading the correct code all it shows me is a blue screen. the backlight is working and the code is:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);


void setup() {
lcd.begin(16,2);
lcd.clear();
lcd.print("hello, world!");
}

void loop() {
}

any ideas why this happens?

Have you tried the contrast adjustment? You need to see rows of blocks before you can have it show text. Adjust the contrast till the blocks appear.

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.

To install the hd44780 library. The hd44780 library is the best available for I2C LCDs. The library is available in the Library Manager. Go to Library Manager (in the IDE menus, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.

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.

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.

Please post photos of your display showing solder joints and both front and back of the LCD.

thx for your participation but i think my LCD is the problem and not the HW-061 since the screen has been dropped and literally thrown many times and did not work even when I connected it with wires instead of a I2C. i tried to use hd44780 library but it is hard to find a good tutorial on yt. hey wouldn't this be a good excuse to get a new OLED screen :slight_smile:

Post a schematic, not a frizzy picture showing how it is connected, word descriptions do not work for me especially when not complete.

The hd44780 library is is LiquidCrystal and LCD API 1.0 compatible.
It is one of the most documented and easiest use libraries for the lcd backpack h/w that you have. It also includes a rich set of heavily commented examples.

You will want to use the hd44780_I2Cexp i/o class for using a PCF8574 based backpack.
First thing to do is, as recommended in the documentation, run the included i2CexpDiag sketch. It will test the i2c signals and then internal LCD ram and report any issues.
Here is a link to the hd44780_I2Cexp i/o class wiki:

And a link to the hd44780 library wiki:

--- bill

Another thing to consider is that some of these OLED "hd44780" LCDs are not fully hd44780 compatible. Several of them have certain screwups in them that can prevent them from working with code that is written to work with hd44780 displays.
Some LCD/hd44780 libraries have some work arounds for certain displays, but most do not.

Just something to keep in mind.
--- bill

This doesn't tell much. Try to switch the backlight off - and after a delay on again. If you see this blink you would know if the I2C communication is working at all.

Allways try the hello world example from the library you are using not just any code you found in the internet. Some libraries require the lcd.init(); (which is part of the LCD API btw).