#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);
boolean state;
int i=0;
void setup()
{
pinMode(16, INPUT_PULLUP);
lcd.begin(16,2);
lcd.setCursor(0,0); // c,R
lcd.print("Counter:");
}
void loop()
{
state=digitalRead(16);
if(state == LOW)
{
i++;
delay(1000);
lcd.setCursor(8,0);
lcd.print(i);
}
}