Hello
I have a problem with the screen. Before adding I2C, it was working well. After adding I2C, it became as you see, even though I put the necessary libraries and the linking is correct. I even tried all the necessary addresses. Note that the screen is 20×04. Where is the problem?
void setup() {
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.setCursor(0, 0); // move cursor the first row
lcd.print("LCD 20x4"); // print message at the first row
lcd.setCursor(0, 1); // move cursor to the second row
lcd.print("I2C Address: 0x27"); // print message at the second row
lcd.setCursor(0, 2); // move cursor to the third row
lcd.print("hello,wolrd");
}
Yes, I used that title I used all possible addresses but it did not work I searched and found that it might be a compatibility issue i2c
And 2004A I found that there are two types of screen: Type A and Type B and each type corresponds I2c Dedicated to him, noting that my screen is type A. I could not find a type I2c Dedicated to her!!
Plain and simple the library is not properly communicating with the LCD.
Because of this, the LCD is remaining in the default power on state.
This could be caused by multiple issues, the most common being
using incorrect address, wiring/soldering issues.
We don't know what arduino board you are using or how you have wired it up or if you might have a 3v vs 5v logic issue.
We don't know what library you are using.
So lots of unknowns.
There is the possibility that the backpack design that you have is not compatible with the "LiquidCrystal_I2C" library you are using.
note: there are many different "LiquidCrystal_I2C" libraries out there, we don't know which one you used.
Nearly all of them are hardcoded for one of the 5 different backpack designs out there.
If there is a mismatch, between the library and the backpack design then the library cannot properly communicate with the LCD even if the i2c address specified is correct.
The other possibility is that there is an issue with the backpack.
While it does happen from time to time, it is quite rare.
The simplest thing to do is install the hd44780 library and run the included I2CexpDiag sketch in the hd44780_I2Cexp i/o class and see if can detect any issues.
The hd44780 library is the only library that will automatically locate the i2c address and automatically detect the pin wiring used between the PCF8574 chip and the LCD.