#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// The LCD display you have is I2C with 4 wires
// Connect Vcc, ev as normal - SCL and SDA as per device - on UNO:
// SCL - pin A5
// SDA - pin A4
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to ex27 for a 16 chars and 2 line display
// setup a variasble and set to 10 to start
int mynumber = 10;
void setup()
{
// initialize the LCD
lcd.init();
// Turn on backlight
lcd.backlight();
// Print top line
lcd.setCursor(0,0);
lcd.print("Counting down...");
}
void loop()
{
// Print top line
lcd.setCursor(0,1);
lcd.print(mynumber);
// Cover any left over characters
lcd.print(" ");
delay(1000);
//decrement mynmber
mynumber--;
// I could also have used my + mynumber - 1
}