Power up two lights using Leonardo, two relays and two pir sensors

First of all, hello to everyone, this is my first post. I just bought today my Arduino Leonardo online, I just can't wait for it and I put alltogether a little bit of code to power up two lights when I enter a room and when I exit the room. I want to know if I got this right, I think the pirState values are NULL, they were in a tutorial, but they had different purposes.

// SENZOR PIR INTRARE CAMERA
int pir1Input = 2;
int pir1State = LOW;
int pir1Value = 0;

// SENZOR PIR PREZENTA CAMERA
int pir2Input = 3;
int pir2State = LOW;
int pir2Value = 0;

// RELEE SPDT COMANDA PLAFONIERA 1 SI PLAFONIERA 2
int relay1Output = 4;
int relay2Output = 5;

void setup()
{
pinMode(pir1Input, INPUT);
pinMode(pir2Input, INPUT);
pinMode(relay1Output, OUTPUT);
pinMode(relay2Output, OUTPUT);
Serial.begin(9600);
}

void loop()
{
pir1Value = digitalRead(pir1Input);
pir2Value = digitalRead(pir2Input);

// DACA PIR1 DETECTEAZA MISCARE ACLANSARE RELEU #1 SI RELEU #2
if(pir1Value==HIGH)
{
delay(200);
if(pir1State==LOW)
{
Serial.println("S-a intrat in camera");
pir1State = HIGH;
delay(200);
pir2State = HIGH;
delay(200);
}

digitalWrite(relay1Output, HIGH);
delay(1000);
digitalWrite(relay2Output, HIGH);
delay(1000);
}

if(pir2Value==LOW)
{
delay(200);
if(pir2State==HIGH)
{
Serial.println("S-a iesit din camera");
pir1State = LOW;
delay(200);
pir2State = LOW;
delay(200);
}

digitalWrite(relay1Output, LOW);
delay(1000);
digitalWrite(relay2Output, LOW);
delay(1000);
}
}

Hi george and welcome.

First of all, please edit your original post to make it easier to read by putting your sketch inside code tags instead of quotation tags. Use the "#" button for this.

I suspect you sketch will not yet do what you intended. Please explain in more detailed steps what you want to happen. Why 2 sensors? Why 2 relays/lights?

In your original post, you mention values of NULL. This concept does not really exist in Arduino terms. Does NULL mean zero in this context?

Also there are many "delay (200);" commands in your sketch. What is the intended purpose of these?

I would recommend putting the relays aside at first. Just connect up a couple of leds (with series resistors) to represent your relays until you have your sketch working. You cannot connect a relay directly to an Arduino output. It will not work and could damage the Arduino.

Paul