#include<ESP32Servo.h>
#define PIR 25
#define pServo 17
Servo myservo;
void setup() {
Serial.begin(115200);
myservo.attach(pServo);
pinMode(PIR, INPUT);
}
void loop() {
Serial.println(PIR);
bool vPIR = digitalRead(PIR);
if(vPIR == 25){
myservo.write(255);
delay(2000);
}
myservo.write(0);
}