1const int PIR_Sensor =2;// the number of the PIR_Sensor pin2const int ledPin =13;// the number of the LED pin3int Motion_State =0;// variable for reading the Motion status45voidsetup(){6pinMode(ledPin,OUTPUT);// initialize the LED pin as an output:7pinMode(PIR_Sensor,INPUT);// initialize the PIR_Sensor pin as an input:8}910voidloop(){1112 Motion_State =digitalRead(PIR_Sensor);// read the state of the PIR_Sensor value:13if(Motion_State ==HIGH){// check if the Motion_State is High.14digitalWrite(ledPin,HIGH);// turn LED on:15delay(10000);16}else{1718digitalWrite(ledPin,LOW);// turn LED off:19}20}