Hi Luckychan,
thank for starting a forum topic.
I'd start with a simple PIR project first, and with just one PIR. For example this one.
Next step; replicate that simple project by using 2 PIRs.
You'd have to add the second PIR to your code, for example with 1 PIR:
int led = 13; // the pin that the LED is attached to
int sensor = 2; // the pin that the PIR sensor is attached to
int state = LOW; // by default, no motion detected
int val = 0; // variable to store the sensor status (value)
void setup() {
pinMode(led, OUTPUT); // initialize LED as an output
pinMode(sensor, INPUT); // initialize sensor as an input
Serial.begin(9600); // initialize serial
}
and with 2 PIRs:
int led = 13; // the pin that the LED is attached to
int sensor1 = 2; // the pin that the first PIR sensor is attached to
int sensor2 = 3; // the pin that the second PIR sensor is attached to
int state = LOW; // by default, no motion detected
int val = 0; // variable to store the sensor status (value)
void setup() {
pinMode(led, OUTPUT); // initalize LED as an output
pinMode(sensor1, INPUT); // initialize sensor as an input
pinMode(sensor2, INPUT); // initialize sensor as an input
Serial.begin(9600); // initialize serial
}
Now you have to incorporate that in you void loop(), but I'm not quite sure what your project is or what it should do.