Arduino connected keypad printing wrong numbers Going crazy here trying to connect a keypad to my Arduino. I followed this article KeypadTutorial, but my guess is something is wrong/different because my keypad only has 9 pins and the far left (pin 1) and far right (pin 9) pins have no traces back to the keypad. I bought it years ago and just got around to finding a use for it. It looks just like this one Arduino Keypad but different with white keys with black font.

The issue is the wrong key shows up (i.e. press 0 and get 9). I used a multi-meter to test for continuity between pins when pressing each key and got results that are kind of stumping me. I would think there would be some kind of pattern (like the first pin would always be a 1, 2, or a 3), but obviously not (or I just have a bad keypad).

KEY(pin1, pin2)
1(2,3)
2(1,2)
3(2,5)
4(3,7)
5(1,7)
6(5,7)
8(1,6)
9(5,6)
0(1,4)
#(4,5)
*(3,4)
Transpose the pins for some of the keys and a pattern will emerge.

KEY(pin1, pin2)      transposed pins
1(2,3)        x        1(3,2)   
2(1,2)                 2(1,2)
3(2,5)        x        3(5,2)
4(3,7)                 4(3,7)
5(1,7)                 5(1,7)
6(5,7)                 6(5,7)
8(1,6)                 8(1,6)
9(5,6)                 9(5,6)
0(1,4)                 0(1,4)
#(4,5)        x        #(5,4)
*(3,4)                 *(3,4)