// Include the libraries:
// LiquidCrystal_I2C.h: [URL]https://github.com/johnrickman/LiquidCrystal_I2C[/URL]
#include <Wire.h> // Library for I2C communication
#include <LiquidCrystal_I2C.h> // Library for LCD
// Wiring: SDA pin is connected to A4 and SCL pin to A5.
// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2);
void setup() {
// Initiate the LCD:
lcd.init();
lcd.backlight();
}
void loop() {
// Print 'Hello World!' on the first line of the LCD:
lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
lcd.print("Hello World!"); // Print the string "Hello World!"
}