#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
const int buttonPin = 2;
int buttonState = 0;
void setup() {
lcd.begin(16, 2);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Button Pressed!");
delay(1000);
lcd.clear();
}
}