int pirPin = 34; //
void setup() {
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(pirPin, INPUT);
}
void loop() {
delay(10);
int motionDetected = digitalRead(pirPin);
if (motionDetected == HIGH) {
Serial.println("Motion detected!");
} else {
Serial.println("No motion.");
}
delay(1000);
}