#define BTN 5
#define LED 33
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(BTN, INPUT);
pinMode(LED, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int status = digitalRead(BTN);
if(status==1){
digitalWrite(LED, HIGH);
Serial.println("HIDUP");
} else if(status==0){
digitalWrite(LED, LOW);
Serial.println("MATI");
}
}