#define BTN_PIN 15
int BTN_STATE;
void setup() {
pinMode(BTN_PIN, INPUT);
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Hello, ESP32!");
Serial.println("Let's Press Button");
}
void loop() {
BTN_STATE = digitalRead(BTN_PIN);
if (BTN_STATE == HIGH)
{
Serial.println("Button is pressed! ");
}
delay(100);
}