Password Controlled door lock with servo

Hello all, to give some background, I am very, very new to Arduino, as well as coding in general. I am trying to build a project that is using a 4x4 matrix keyboard that I have successfully turned into a one wire input. My next step is to add a servo, along with a push-button switch. From the keypad, you will have to input a password for the servo to unlock the door. I want the servo to delay about 10 seconds before re-locking the door. When you are inside the room, I want to incorporate a push button switch to open the door, wait 10 seconds, and re-lock the door (giving you enough time to close the door before locking).

Here is the code for the keypad:

String keys="123A456B789C*0#D";
int key;
boolean key_lockout=false;

void setup(){
   Serial.begin(9600); 
}

void loop(){
  key=getKeypad();
  if(key!=-1)
      Serial.println(keys[key]);
   delay(10);
}

int getKeypad(){
  int ret=-1;
  boolean reset_lockout=false;
  if(analogRead(A0)==0)
    key_lockout=false;
  else if(!key_lockout){
    delay(20);
    ret=15-(log((analogRead(A0)-183.9)/58.24)/0.1623)+0.5;
    key_lockout=true;
  }
  return ret;
}

I have tested this in the serial monitor, and it works flawlessly. My problem lies with completing the code with the servo and pushbutton added. I also have 2 LEDs added onto pins 11 & 12, with the servo control on pin 13. I tried to follow this tutorial with using the one wire keypad, and many errors came up. I tried to copy other codes into this one, but it was a bust. Any help would be greatly appreciated. Thanks in advance.

As an update, I have figured out how to make a push-button open, then delay, and then close, but now I need to integrate them together (meaning the keypad to open the servo).

Do not cross-post. Other thread removed.

[quote author=Coding Badly link=msg=1982496 date=1417398494] Do not cross-post. Other thread removed.

[/quote]

Sorry, I didn't know if it would have been better to post in coding issues or not.