hello please help with lcd display

hello i try to connect my lcd display with ywrobot like in the picture:

my code is:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup()
{
lcd.init();
lcd.backlight();

}
void loop()
{
lcd.setCursor(1,0);
lcd.print(“hellow world”);
}

But nothing happens I really would love to help… thanks!!!

Before you deal with getting your display to work you should modify the sketch. For your initial program you should not be trying to do anything in loop() so there should be nothing between the { and } brackets. Move the lcd.print statement to the end of setup().

You haven't specified the source of your library but you have to make sure that it was written for your particular I2C adapter and that you have the correct information in the 'constructor'.

As an alternative I suggest that you look through some of the recent threads that have I2C and/or LCD in their titles and look for a link to the hd44780 library written by Bill Perry.

EDIT: Here it is --> https://github.com/duinoWitchery/hd44780

Don

Ouri1403, The hd44780 library is available in the IDE library manager. You can install it using the Arduino IDE GUI in just a few seconds. It should automatically locate & detect the backpack as well as its wiring configuration settings. You will want to use the hd44780_I2Cexp i/o class.

It also includes a diagnostic sketch (I2CexpDiag) which will test the i2c h/w and connections to the backpack.

You can read more about the library on the github page.

--- bill

I forgot to ask ... did you adjust the contrast potentiometer?

Don

Try changing 0x27 to 0x3F

Do you get any errors in the IDE when you try to upload? Are you using code that came with the library or did you copy it off the net somewhere so you library and code are mismatched? Older libraries seem to use lcd.init while newer ones seem to like lcd.begin

INTP: Try changing 0x27 to 0x3F

Using "trial and error" or Guessing is a poor way to try to solve problems. It my view, it is a waste of time. If the address is suspect, run an i2c scanner to get the i2c address for the backpack.

If using the hd44780 library, you don't have to know the address, since it figures it out for you. And if interested in the address, or want to test the i2c connections and the display, you can run the I2CexpDiag sketch which will report that information. It even does a memory test on the memory inside the LCD module.

--- bill

Was going to suggest the i2c scan myself, but considering the OP’s level, it wasn’t really much of a trial and error. There are really only 2 largely likely possibilities of default address so to ‘trial’ would only take one try.

INTP:
Was going to suggest the i2c scan myself, but considering the OP’s level, it wasn’t really much of a trial and error. There are really only 2 largely likely possibilities of default address so to ‘trial’ would only take one try.

bperrybap:
Using “trial and error” or Guessing is a poor way to try to solve problems.
It my view, it is a waste of time.
If the address is suspect, run an i2c scanner to get the i2c address for the backpack.

If using the hd44780 library, you don’t have to know the address, since it figures it out for you.
And if interested in the address, or want to test the i2c connections and the display, you can run the I2CexpDiag sketch which will report that information. It even does a memory test on the memory inside the LCD module.

— bill

INTP:
Try changing 0x27 to 0x3F

Do you get any errors in the IDE when you try to upload? Are you using code that came with the library or did you copy it off the net somewhere so you library and code are mismatched? Older libraries seem to use lcd.init while newer ones seem to like lcd.begin

floresta:
I forgot to ask … did you adjust the contrast potentiometer?

Don

thanks for your help freinds I checked with a scanner and i get 0x27
Again I checked this code:

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

LiquidCrystal_I2C lcd(0x27,16,2);
void setup()
{

lcd.init();
lcd.backlight();
lcd.setCursor(1,0);
lcd.print(“hellow world”);

}
void loop()
{

}

on the screen do not see anything

Bill's Scanner will report the I2C address and the correct constructor().

I suggest that you copy-paste the report from the Scanner. And post a link to the actual site where you found your LiquidCrystal_I2C.h library.

David.

Ouri1403:
on the screen do not see anything

What library are you using and have you installed multiple libraries trying to get this to work?

That code is VERY different from your original code.
(And I’m not referring to the code in setup() or loop() )
In this new code you are including <LCD.h>
that header is part of fm’s new LiquidCrystal library; however, that library does not have a init() function as it uses begin() so it isn’t clear what library you are actually using.
If you have multiple LiquidCrystal_I2C libraries installed (say fm’s and some other LiquidCrystal_I2C), then you could actually be using part of one library and part of another since there would be a collision of that header file name and the IDE can’t know for sure which header or library to use.

That is why multiple libraries that have the same name or use a header file with the same name is very problematic.

At this point since you appear to have the correct address, (and if it there is not some sort of h/w issue - like bad backlight or misdjusted contrast) the issue likely to be that backpack that you have does not have the PCF8574 pin wiring that the library you are using.

Unless you have an opposition to GPL v3 code,
I would highly recommend the hd44780 library as it will automatically figure out all the low level configuration stuff and has no collision issues with other libraries.
My goal with that library was to create a “it just works” library, in particular for i2c backpack based LCDs.
It can be installed in seconds using the IDE library manager.
The I2CexpDiag sketch will test the i2c connections and the LCD h/w.
That diag sketch will report a wealth of information.
It includes an I2C scanner as well as a scanner for i2c backpacks.

You literally could have the display up and running in about 1 minute if you installed the hd44780 library from the library manager. If there is an issue, then run the diag sketch and have it report the issue(s).

— bill

I ask again, do you have any errors shown when uploading?