how to use "mills" in my code?

hi im wondering how do i use this mills in my sketch,i have the 3 door alarm..when they are opened they trigger and led,but i cant really figure out how to also add the pir sensor so when somone walks into the room another led turns on. i have tried this why but havent been able to figure it the arduino able to watch the 3 doors and watch the pir at the same time? thanks :%

int door1 = 2; //front door int door2 = 3; //back door int door3 = 4; //porch door int led1 = 13;

void setup() { pinMode(door1,INPUT); pinMode(door2,INPUT); pinMode(led1,OUTPUT);


void loop() { if (digitalRead(door1) == HIGH || (digitalRead(door2)== HIGH)) { digitalWrite(led1,LOW); millis(500); digitalWrite(led1,HIGH); millis(500);

{ int motion1 = 5; pinMode(motion1,INPUT); if (digitalRead(motion1)== HIGH) { digitalWrite(led1,HIGH); }


{ digitalWrite(led1,LOW); } } }

else { digitalWrite(led1,LOW); } }

Look at the blink without delay example. You are currently not even close. millis() is NOT a direct replacement for delay().

ha ha ok thanks

Not part of your problem or the solution but

      int motion1 = 5;

does not really belong in the loop() function

ok i was just trying differnt ways