//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <LCD_I2C.h>
#include<Wire.h>
int btn = A2 ;
int B=0;
LCD_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
pinMode (btn,INPUT_PULLUP);
Serial.begin(9600);
lcd.begin();
}
void loop()
{
B = digitalRead(btn);
Serial.println(B);
if (B == 1){
lcd.backlight();
}
if (B ==0){
lcd. clear();
lcd.noBacklight();
}
}