I have the following code for my arduino UNO connectd to the LCD screen:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // 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(1, 2);
lcd.print("Hello");
}
void loop()
{
}
The connections of the backpck with the arduino are:
VCC-5V
GND-GND
SDA-A4
SCL-A5
There is no error message but the LCD just goes black after 1 sec and back to lighting up after another sec. No text no nothing. What is wrong?
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // 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(1, 2);
lcd.print("Hello");
}
void loop()
{
}
The connections of the backpck with the arduino are:
VCC-5V
GND-GND
SDA-A4
SCL-A5
There is no error message but the LCD just goes black after 1 sec and back to lighting up after another sec. No text no nothing. What is wrong?