int pinPIR = 15;
boolean statusPIR = false;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(pinPIR, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
statusPIR = digitalRead(pinPIR);
if(statusPIR){
Serial.println("ADA ORANG");
} else{
Serial.println("TIDAK ADA ORANG");
}
delay(1000); // this speeds up the simulation
}