# 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)
``````
• in your list, transpose the pins for a couple of keys and a pattern will emerge .... `1(3,2)` and `3(5,2)` and `#(5,4)` – jsotola Jun 29 '18 at 1:15
• @jsotola - I can't believe I completely missed that. Soon as I transposed the keys you pointed out and wrote it out on paper in a square pattern it made perfect sense. Wired it up, correctly, and it worked perfectly. If you want to post it I'll mark it as answered. – Tom Jun 29 '18 at 7:44

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)
``````