#include <LiquidCrystal.h>

// rs,e,D0-D7
LiquidCrystal lcd(12,11,10,9,8,7);

const int btnPin = 2;
int n = 0;

void setup() {
  lcd.begin(16,2);
  pinMode(btnPin, INPUT);
}

void loop() {
  bool btnState = digitalRead(btnPin);
  

  if(btnState == HIGH){
    lcd.setCursor(1,0);
    lcd.print(n);
    n++;
    delay(500);
  }
}