arduino sensores de movimiento

const int PIRPin1 = 3;
const int PIRPin2 = 11;
const int RELE1 = 4;
const int RELE2 = 10;
int pirState1=0;
int pirState2=0;

void setup()
{
pinMode(PIRPin1, INPUT);
pinMode(PIRPin2, INPUT);
pinMode(RELE1, OUTPUT);
pinMode(RELE2, OUTPUT);
Serial.begin(9600);
}

void loop()
{
pirState1 = digitalRead(PIRPin1);
pirState2 = digitalRead(PIRPin2); //estado es igual y lee a pir 1 y pir2
if (pirState1 == HIGH) // si estas previamente prendido
{
digitalWrite(RELE1, LOW);
delay(10000);
}
else if (pirState2 == HIGH)
{
digitalWrite(RELE2, LOW);
delay(10000);
}
else
{
digitalWrite(RELE1, HIGH);
digitalWrite(RELE2, HIGH);
}
}

aca dejo mi codigo para progarmar dos sensores de movimiento con arduino1

Hello Leanmedina,

Thanks for participating!

We take our Code of Conduct very seriously and want to help ensure that everyone has a good experience free of antagonism and harassment. Unfortunately, we don’t currently have moderators for languages other than English. What this means is that, until that changes, we need to ask that everyone use English here in the GitHub Community Forum when posting. We’ll be locking any posts in languages other than English for now, including this one.

Thanks for meeting us halfway.