// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.begin (20,4);
// Position cursor and write some text
lcd.home (); // go to the first line, first character
lcd.print("");
lcd.setCursor ( 0, 1 ); // go to the 2nd line
lcd.print("");
lcd.setCursor ( 0, 2 ); // go to the third line
lcd.print(" hello world!");
lcd.setCursor ( 0, 3 ); // go to the fourth line
lcd.print("****");
yeah, sometimes appears a contrast on the LCD Board
Slowly, turn the contrast pot to CW and then CCW to see if there is any character (s) that has really appeared on the LCD. Keep the contrast value approximately in the middle of the pot.
Please read this link for possible cause of non-functionality of your I2C LCD.
GolamMostafa:
Slowly, turn the contrast pot to CW and then CCW to see if there is any character (s) that has really appeared on the LCD. Keep the contrast value approximately in the middle of the pot.
Please read this link for possible cause of non-functionality of your I2C LCD.
If the IO extender is the same, then the deviceaddress should be in the range: 0b0100000 - 0b0100111 (0x20 - 0x27). There is now way for it to be 0x3F (0111111). Probably, you have the wrong Library installed (please read this link).
The lcd object contains three arguments LiquidCrystal_I2C lcd(deviceAddress, 20, 4); ant not like this:LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin) which contains 8 arguments.
jordibullo:
i tried 1,2,3 and nothing...
I don't use resistors in I2C, should I?
I don't understand this at all. I can understand the concept of trying 1) since that is just moving a line of code but trying "2) Are you sure that those are the correct pin assignments for your device?" makes no sense. How can you 'try' to check the pin assignments?
How did you 'try' "3) Are you sure that is the correct I2C address for the lcd. " ? did you run Nick Gannon's little sketch to see what your I2C address is? If so, what was the result. I have two different piggy back boards for these LCD displays with different I2C addresses and different PCF8574 pin usage.
I'm not sure I believe " i tried 1,2,3 and nothing..." !
Edit: One of my piggy back boards looks identical to yours and it most definitely does not have I2C address 0x3F
! Neither does the other one.