Help with Ping Sensor and Sound Pal

Hello,
let me start off by stating that I am a newbie in the field of micro-controllers. Im currently trying to make a ping sensor security device- trying to utilize a 4x4 keypad to control a ping sensor mounted to a servo, which begins to sense the distance when a correct code is imputted in the keypad. Now if the ping detects a change in distance, my sound pal (parallax brand) will start beeping. So far I am able to use the keypad to turn the Led on and off (I know… much of a loser right xD). The code im curently using is below. I was hoping someone would know how to intergrate the servo, ping, and sound pal concept to this code- and hopefully share this knowledge with me. Thanks in advanced!

#include <Keypad.h>

const byte numRows= 4; //number of rows on the keypad
const byte numCols= 4; //number of columns on the keypad

//keymap defines the key pressed according to the row and columns just as appears on the keypad
char keymap[numRows][numCols]=
{
{‘1’, ‘2’, ‘3’, ‘A’},
{‘4’, ‘5’, ‘6’, ‘B’},
{‘7’, ‘8’, ‘9’, ‘C’},
{’*’, ‘0’, ‘#’, ‘D’}
};

//Code that shows the the keypad connections to the arduino terminals
byte rowPins[numRows] = {9,8,7,6}; //Rows 0 to 3
byte colPins[numCols]= {5,4,3,2}; //Columns 0 to 3

//initializes an instance of the Keypad class
Keypad kpd= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

#define ledpin 13

void setup()
{
pinMode(ledpin,OUTPUT);
digitalWrite(ledpin, HIGH);
Serial.begin(9600);
}

void loop()
{
char key = kpd.getKey();
if(key) // Check for a valid key.
{
switch (key)
{
case ‘*’:
digitalWrite(ledpin, LOW);
break;
case ‘#’:
digitalWrite(ledpin, HIGH);
break;
default:
Serial.println(key);
}
}
}