Nothing happens when uploading to LCD - cant find the ic2 adress

Hi i dont understand why its compiling but nothing happens when i upload, just using the Hello world template. Also my ic2 scanner cant find any other adresses than 0x58 and 0x67, i tried those adresses as well with the same result..

Help please!

//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
lcd.init(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("Hello, world!");
lcd.setCursor(2,1);
lcd.print("Ywrobot Arduino!");
lcd.setCursor(0,2);
lcd.print("Arduino LCM IIC 2004");
lcd.setCursor(2,3);
lcd.print("Power By Ec-yuan!");
}

void loop()
{
}

That is because the compiler only checks the code syntax, nothing to do with if the code will run or run like you want it to.

So that means those are the only two addresses responding. Do you have other devices on the I2C bus?
What sort of Arduino are you using?
What sort of LCD module are you using?
Have you got pull up resistors on the Arduino or LCD board?

Is that the one that is in the example folder called HelloWorld_i2c ?
If so your code does not match that example because your

Dose not seem to match with the one in the example that says:-

LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);  // Set the LCD I2C address

We can only know what you tell us about your project.

1 Like

So just what does "nothing happens" mean?

The code does upload? Presumably it does as you have also run an I2Cscanner. What does the scanner say if you have no display connected?

Point here is that for start, you are using a defunct library. Install the "HD44780" library in the IDE Library Manager, run the test examples from the I2C class and you should find any working I²C backpack and be able to use the display with the example code from that up-to-date library.
:+1:

  1. I also tried uploading with no problem, and also no effect on the lcd.
  2. Arduino nano, lcd 2004 with i2c shield on it and no i dont have any resistors as i thought everything was in the i2c backpack.
  3. the example in my examples* is named "HelloWorld" and thats the code that comes up when selecting it.

Your inputs are apreciated

input: It still says 0x57 and 0x68 when i disconnect the lcd, which i dont understand, i have an rtc and a pwn module connected, thats all. As far as i understand those arent i2c modules right?

Nothing happens means that the backlight works, the first row is filled with white squares, the 2nd row is plain, and so fourth for the 2 other rows.

I will try to download that library, and see what happens.

Your inputs are much appreciated.

So update.

I installed and tried the HelloWorld in the library you suggested and the same thing happens.

I dont know if there is something im missing or i need to edit the pin numbers? and also should'nt i include an i2c adress? And i dont know if the pin numbers are correct as the lcd i2c backpack only have 4 pinouts.

This is the code im getting:

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}

Hi @victorlh
Whenever you post codes, use </> tags.

Please redo the posts that placed codes.

This last code you posted is not for I2C, it uses the LCD's direct pins.
It will not work with your I2C LCD.

RV mineirin

Your code still refers to the defunct "LiquidCrystal" library but now is the non-I²C version. It will never work.

You need to work through the examples given in the HD44780 library. The "test" example will tell you whether there is a working display connected or not.

We don't even know (without a schematic and pictures) how you have connected your display except that (backlight and white squares) it does have power.

Thought so too with that library.

I dont understand with the posts, can you explain?

Sry im new to the forum.

When i search for the library you wrote, i get that LiquidCrystal library, that you say is defunct. Also i cant find any i2c examples under that.
here is the library:

and here is the examples

The i2c is connected this way.

Scroll down a little further in the library manager until you see hd44780 by Bill Perry. That is the library to use.

Okay, but when i go in there is no HelloWorld example or anything like that under the i2c fan.

Specifically, go to the Library Manager under Tools ==> Manage Libraries
Scroll down (it takes a while and sadly the "filter your search" function simply does not work!) to find the "hd44780" library by Bill Perry and install it.

Then you will find "HD44780" in your examples.

For I²C, the old LiquidCrystal library is useless.

OK, looks like you have found it but mistakenly gone to "Other Libraries" which is useless.

OK, found it for you:

The first line you see says Documentation. Start by reading that.

The library covers many types of i2c displays, and you need to use the correct i/o class for the backpack displays using the i2c expander.
Examples->hd44780->ioClass->hd44780_I2Cexp

Then you want to run the sketch called "I2Cexpdiag " which is an i2c LCD i/o expander backpack diagnostic tool. Report the results of running that sketch.

Here is the result.

Great. Now you need to figure out why the display is not seen on the i2c bus. How is the display connected to the Arduino? Are there jumper wires or a bread board involved? My guess is that there is an open connection somewhere. Perhaps even on the module itself.

Hi @victorlh
In the module connected to the LCD has a chip.
it's probably the PCF8574 a or B chip.
Can you confirm if your module's chip is really this one?
Can you also post a link that shows your LCD or a link where you bought it?

RV mineirin

Those addresses are most likely the RTC and PWM modules. These don’t appear on any diagram you have shown so far.

Just strip everything back to nothing, you should see the bus scan return no found address. Then add your LCD module, if you find no addresses found then that means one of two things:-

  1. your LCD module is broken

  2. you have not wired up your LCD module correctly.

It is a total waste of time doing anything else until you find an address your bus responds to with only the LCD module connected.

agreed, i maybe think its broken because now i've tried a thousand things and triple checked that all wires are correct. I also heard others with the same problem and then they changed to a new lcd and it worked.

here is the link where i bought it