I am trying to use two pir sensors. and here i want to light on the led when 1 is high and switch it off when 2 is high.. please help me with this
const int p1Pin = 1;
const int p2Pin = 2;
const int ledPin = 13;
here i want to light on the led when 1 is high and switch it off when 2 is high.
How far apart are the sensors? How does what this code does differ from what you want to have happen?
const int p1Pin = 1;
Digital pins 0 and 1 are the serial port. Unless you absolutely must use pin 1, you'd be well advised not to.
Add a call to Serial.begin() in setup(), after you change the PIR pin. Add calls to Serial.print() and/or Serial.println() in loop(), to see what is happening in your code/with your hardware.