16x2 I2C LCD display just wont work!

Help! im new at this and im just trying to do something very simple. Display a text in a 16x2 LCD with a 12c module attached to it.

Code doesnt show errors
I installed the liquidcrystal and liquidcrystal 12c library
i connected and doble check
still doesnt work..is blank

Im attaching some pics and the schematic.

help please! thanks in advance!

the code>

*/
#include <LiquidCrystal_I2C.h> //DESCARGAR LIBRERÍA:Codigos-arduino/LiquidCrystal_I2C.zip at master · ELECTROALL/Codigos-arduino · GitHub
LiquidCrystal_I2C lcd(0x3f,16,2); // si no te sale con esta direccion puedes usar (0x3f,16,2) || (0x27,16,2) ||(0x20,16,2)
void setup() {
lcd.init();
lcd.backlight();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("==> VIDEOS <==");
lcd.setCursor (0,1);
lcd.print("==> ELECTROALL <");
}
void loop() {
lcd.display();
delay(500);
lcd.noDisplay();
delay(500);
}

rsz_descarga.jpg

rsz_descarga.jpg

Step 1: search an "I2C Scanner" sketch and load it in your Arduino.
Check if your Arduino can communicate with the chip on your module and if the address is really @ 0x3f
If the scanner can't find the module or if you have set a wrong address it will not work

Step 2: adjust the contrast of you display with the blue pot.
Without a program it must show black blocks in one line.
If the contrast is set wrong you can't see any characters.

I would recommend using the hd44780 library with the hd44780_I2Cexp i/o class.
There are multiple different h/w designs used on i2c backpacks.
The LiquidCrystal_I2C only works with 1 version of the backpack, if you don't have that version it will not work.
The hd44780 library will auto locate the i2c address and auto detect the pin mappings used on the backpack so that it works with all versions of the backpack.
The hd44780 library can give you a plug and play experience without having to configure anything in the sketch.

You can install the hd44780 library directory from the IDE GUI with no zip files involved.
After you install it you should run the included I2CexpDiag sketch which will test your i2c signals then test the LCD to make sure everything is working.

Documentation is available in the Documentation sketch once the library is installed.
You can also read more about it on the github page here:

--- bill

Step 1 is actually don't connect the I2C pins (SDA, SCL) but adjust the contrast potentiometer until you clearly see the "blocks" on the first line.

The next steps include connecting the I2C pins and running the HD44780 test code, but setting the contrast is the first. :grinning:

In line with what paul said, if the display is totally blank with no pixels showing up, you need to turn the contrast pot in the little blue block on the backpack.

Hello everyone and thank you for all your response!! you were very helpfull and it worked!!!

Im not sure what was the problem. What i did was>

  • Turn up the contrast so i can see the pixels (shows one line with squares)
  • I included the library that bperry recommended ( i just downloaded it and included in the library folders)
  • I run the 12C scanned Sketch that Nosaica.

At first the scanner wasnt working ad said device not found. After several attempts and different sketches, i just unpluged and pluged the display and worked!

thanks again everyone :slight_smile:

hmm.... You changed your post to something very different right as I was responding.
Anyway, in response the current post.

Hello everyone and thank you for all your response!! you were very helpful and it worked!!!

What worked?
The I2CexpDiag sketch?

Im not sure what was the problem.

Me either, but it sounds like you might still have some kind of intermittent issue.
This is why it is a good thing to run the I2CexpDiag sketch that comes with the hd44780_I2Cexp i/o class.
It will test the i2c signals, run an i2c scan, then test the internal LCD RAM of each device it discovered.
It will report any issues it finds.

What i did was>

  • Turn up the contrast so i can see the pixels (shows one line with squares)

contrast is good when you see the one line of squares - but it also means that the LCD is not being initialized.

  • I included the library that bperry recommended ( i just downloaded it and included in the library folders)

But it appears that you have not installed the hd44780 library properly.
It appears that you installed it using a zip file downloaded from the github repository which created a directory with the incorrect name. Not only is it more difficult to install from a zip file than using the library manger network install capability, but having a library improperly installed can cause issues in the future when updating the library.
Installing from a zip file is not the recommended way to install the hd44780 library unless you are using an IDE prior to 1.6.2 which I would not recommend using and I assume you are not using.

Use the library manager to install the hd44780 library from the network directly, that way the library gets installed in the proper location with the proper name.
See post #2
or the detailed instructions on the hd44780 github repository.

To fix it, I would recommend deleting the hd447680-master directory and re-install it using the library manager - and not with a zip file.

  • I run the 12C scanned Sketch that Nosaica.

If you are using the hd44780 library, there is no need to do an i2c scan.
I assume you are using the hd44780 library since I didn't see any other i2c LCD libraries in your "libraries" directory.

The hd44780 library can auto locate the i2c address and then auto detect the pin mappings used by the backpack and all the hd44780_I2Cexp examples use this capability.

--- bill

Thanks for all that input. Ill be sure to do that!

Thanks again bill

This topic was automatically closed after 64 days. New replies are no longer allowed.