#include <LiquidCrystal.h>
const int rs=15,en=4, d4=13,d5=12,d6=14,d7=27;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
int i=0;
boolean state;
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Counter");
pinMode(25, INPUT_PULLUP); //initally high, when press, valid state low
}
void loop()
{
state=digitalRead(25);
if (state ==LOW)
{
i++;
delay(500);
lcd.setCursor(8,0);
lcd.print(i);
}
}