int pinPIR = 17;
boolean statusIR = 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:
statusIR = digitalRead(pinPIR);
if(statusIR){
Serial.println("Ada orang");
} else {
Serial.println("Tidak ada orang");
}
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
}