int powerPin = 13; //The power for the motion sensor byte sensorPin = 12; //The sensor input void setup() { // put your setup code here, to run once: pinMode(sensorPin,INPUT); //Declare sensorPin as a input pinMode(powerPin, OUTPUT); //Declare powerPin as a output Serial.begin(9600); //Start the serial moniter at 9600 baud rate } void loop() { // put your main code here, to run repeatedly: byte readSensorPin = digitalRead(sensorPin); //Declare that readSensorPin means read sensorPin if(readSensorPin == 1){ //Check if someone is nearby Serial.println("Somebody is nearby"); //If someone is, print that to the serial moniter } if(readSensorPin == 0){ //Otherwise if someone is not nearby Serial.println("Nobody"); //Print that to the serial moniter } delay(500); //Wait 1/2 a second }