#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 9, d5 = 8, d6 = 7, d7 = 6;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int btn=3;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
Serial.begin(9600);
// Print a message to the LCD.
lcd.setCursor(0,0);
lcd.print("Hello all guy");
lcd.setCursor(1,2);
lcd.print("welcome");
delay(1000);
lcd.clear();
lcd.print (" to day no class");
lcd.setCursor(2,1);
lcd.print("but have homework");
pinMode(btn, INPUT);
if(btn==HIGH){
lcd.setCursor(3,1);
lcd.print("btn read:");
delay(1000);
lcd.print("%d");
lcd.clear();
}
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
}