4x3 Keypad & Arduino

Hey everyone, I am trying to figure out how to use the 4x3 Keypad from Sparkfun with my Arduino Diecimila. In which case, I am thinking this project is over my head. All I want to do is to be able to press a key such as "2" and have it should up as "2" on the serial out. I have read this post and aware that I need pull ups and I have also read and retrieved the library, code, etc. from this tutorial.

To get started, there are 9 pins on the keypad. Which keypad pin needs to go the which arduino digital pin?

Any help is much appreciated.

Read the keypad playground article you linked to.

The basic idea is you scan through the rows, on each row checking if a button is pressed. For example set all the rows as outputs and HIGH and all the columns as inputs with the weak pull-ups on. Turn one row LOW and check if any of the inputs are LOW, if so, that row/column is pushed. Turn that row back to HIGH and the next row to LOW. Repeat this in your main loop.

Ok I have made some progress and are now able to get number to appear through the serial monitor. However, the numbers are not what I am pressing on the keypad. for example here is my standard 4x3 keypad:

123 456 789 *0#

Now, this is what is being presented when I push it's respective button:

BAx 63x 52x 41x

"x" = no function

Here is my pin setup: Keypad Pins: 1 2 3 4 5 6 7 8 9 Arduino Pins: x 3 7 2 6 0 5 4 x

10K Resistors on Keypad pins: 2,3,4 (going to 5V+)

What do I need to alter to make the keypad work correctly? Thank you.

PDE file: http://www.mediafire.com/file/j1mwv0gitz2/keypad5.pde CPP file: http://www.mediafire.com/file/lmkil3zwczd/keypad5.cpp