I bought the book: home automation projects with Arduino.
I have a problem to make the Liquid Cristal display work.
With the simple test to turn the backlight and print a message.
I have no errors messages, although the display just shows its backlight, without blinking.
see the code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin();
lcd.backlight();
lcd.print("LCD ok!");
}
void loop()
{ lcd.backlight();
delay(200);
lcd.noBacklight();
delay(200);
}
what do I wrong? Is the display defect?
Look in the examples under LiquidCrystal_i2c. Is there one in there to "sniff" the port address? (I realise there is high a possibility that your library and the one I have are from totally different authors. )
I'm betting the address of 0x27 is wrong.
And then I have to ask why you would try to blink the backlight 5 times per second?
Does the backlight come on when powered?
Also, at the top of every forum here, is a post titled "How to use this forum - Please Read". Have a look at that So you know how to post code here. It should look like .....
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin();
lcd.backlight();
lcd.print("LCD ok!");
}
void loop()
{ lcd.backlight();
delay(200);
lcd.noBacklight();
delay(200);
}
Thanks for you answer.
I should also believe that the adres is wrong.
The backlight is working , just no blinking.
That was just for the test in the book.
My code is exactly the same as you write. No error messages.
What should the adress for the LCD be?
Where can I find it.
What should you try?
The fact that it includes "wire.h" would indicate a possibly older library.
What was the source of the link (link please" ?
The link is:
Where did you get your LiquidCrystal library from?
greetings
Wim
Do a search for Nick Gammon's I2C scanner. That should take the doubt away about the address.
Thanks a lot.
I found the solution:
the address for the LCD is not 0x27 but instead: 0x3F
thanks for your help
Wim