#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // initialize the library with the numbers of the interface pins
void setup() {
lcd.begin(16, 2); // set up the LCD's number of columns and rows:
lcd.print("hello, world!"); // Print a message to the LCD.
}
void loop() {
lcd.setCursor(0, 1); // set the cursor to column 0, line 1
lcd.print(millis() / 1000); // print the number of seconds since reset:
}
Visit https://www.arduino.cc/en/Reference/LiquidCrystal for liquid crystal libraries and more information.
Challenge: Use and sensor to display values read from the sensor on the LCD screen instead of the serial monitor.