help please

first like to say arduino is the best..

need a little help programming a hall way senor on door to relay

void loop(){

if (openTime && millis() - openTime >5000) { //4000
  resetLock();
}

}



void openLock() {

 openTime = millis();  // using to turn off relay in 5000 millis
 
  if (digitalRead(reedPin1) == HIGH){ // pin to hall way senor high = door locked
     digitalWrite(LOCK_PIN, HIGH); // send Relay lock on 
        lcd1.createChar(5, door); // print char picture of door lol
  lcd1.setCursor(0,2);  // second line lcd display
 lcd1.print("Open door!");  // display open door
  lcd1.setCursor(15,1);
  lcd1.write(byte(5));
 delay(5000);  // delay before going back to entryscreen to enter new password to activate system again
  displayCodeEntryScreen1();// 
 
 } 

}

Need to read reedpin1 if high (SENOR CLOSED) then to write lockpin high for 60 seconds as im using a solenoid door lock then keep repeating this until reedpin1 is low (SENOR OPEN)

Please rephrase your question.
Please attach all your code using the <> icon in the menu.

need a little help programming a hall way senor on door to relay

What is a senor?

then keep repeating this until

Why repeat anything. Once you have set an output to one logic level it will not change until you put it to another.

senor im using on door
http://www.ebay.co.uk/itm/New-Magnetic-Sensor-Home-Door-Window-Entry-Warning-Alarm-Switch-PF-/261621271655?pt=LH_DefaultDomain_3&hash=item3ce9d7cc67

so when the senior is high the door closed… i would like the following to happen

start relay for 60 sec then turn off then start again until

senior is low the dooe is opened…

so the solenoid on the relay locks the door

So not a senor at all but a sensor.

Is that a door sensor? You said:-

so the solenoid on the relay locks the door

So if the door is locked how is the sensor going to change?

Can you explain how your system will operate, the words you are using are not clear enough.