help with keypad using analog input

Take a look at this library and follow the keypad diagram.
OneWireKeyPad