void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(4, INPUT_PULLUP);
}
void loop() {
int a=digitalRead(4);
Serial.println(a);
if(a==HIGH){
Serial.println("Motion Detected");
}
if(a==LOW){
Serial.println("Motion not Detected");
}
delay(10);
}