You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
535 B
30 lines
535 B
//YWROBOT
|
|
//Compatible with the Arduino IDE 1.0
|
|
//Library version:1.1
|
|
#include <Wire.h>
|
|
#include <LiquidCrystal_I2C.h>
|
|
|
|
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
|
|
|
|
void msg()
|
|
{
|
|
lcd.setCursor(0,0);
|
|
lcd.print("you just lost");
|
|
lcd.setCursor(8,1);
|
|
lcd.print("the game.");
|
|
}
|
|
|
|
void setup()
|
|
{
|
|
lcd.init(); // initialize the lcd
|
|
// Print a message to the LCD.
|
|
lcd.backlight();
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
lcd.clear();
|
|
delay(9000);
|
|
msg();
|
|
delay(500);
|
|
}
|
|
|