// include the LiquidCrystal.h library
#include <LiquidCrystal.h>
/*
* Pin LCD Descriptions:
* Pin 1 --- Ground
* Pin 2 --- VDD Power for the LCD
* Pin 3 --- Contrast Adjust
* Pin 4 --- Register Select (RS)
* Pin 5 --- Read / Write select (R/W)
* Pin 6 --- Enable (E)
* Pin 7 --- not used
* Pin 8 --- not used
* Pin 9 --- not used
* Pin 10 -- not used
* Pin 11 -- Data line (D4) 4-bits
* Pin 12 -- Data line (D5) 4-bits
* Pin 13 -- Data line (D6) 4-bits
* Pin 14 -- Data line (D7) 4-bits
* Pin 15 -- Backlight Power
*/
const int rs = 7; // Pin 7 on Arduino to pin 4 (RS) on LCD
const int en = 6; // Pin 6 on Arduino to pin 6 (E) on LCD
const int d4 = 12; // Pin 12 on Arduino to pin 11 (D4) on LCD
const int d5 = 10; // Pin 10 on Arduino to pin 12 (D5) on LCD
const int d6 = 9; // Pin 9 on Arduino to pin 13 (D6) on LCD
const int d7 = 8; // Pin 8 on Arduino to pin 14 (D7) on LCD
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// Set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print Hello World! to the LCD.
lcd.print("Hello World!");
}
void loop() {
// The location of line one is 0
// The location of line two is 1
// set the cursor to column 0, line 1 the print the second line
lcd.setCursor(0, 1);
lcd.print("Seconds ");
lcd.print(millis() / 1000);
}