User Input through keypad

NOOB Question

What I would like to do is have the user set some variables through a 4x4 keypad I have set up. Currently I have an lcd monitor set up and a 4x4 keypad all hooked up to an Arduino mega 2560. I would like to do something like the following sudo code but I dont know how to make it happen. Like I said I am a noob so this is probably really dumb, but I promise to answer dumb questions of other noobs when I become useful :slight_smile:

SUDO:

lcd.print("Set Timer Length");
wait for user input

start timer where time = user input

I know this is really rough, but I just want to work on the input and then I will figure out how to do the timer and all of that. Thanks for the help and I promise to pay it forward.

Start with these:
http://playground.arduino.cc/Main/KeypadTutorial

http://playground.arduino.cc/Code/Timer

Thanks for the tip, I have actually got all of that working already fine (except the timer thanks for that). My problem is figuring out how to get the user to be able to set variable from the keypad.

So i guess in summary what I have so far is a working lcd and keypad. I know how to prompt the user for input, but I dont know how to get the button presses from the keypad to set a variable that I could then plug into the timer function.

When a number is entered multiply it by 10, the next number is added and result is multiplied by 10 again etc. when an * or # is received set the timer with the assembled value.