I was unsure of where to post this, but I saw analog input listed under sensors so here made sense to me. Let me know if this belongs somewhere else.

I'm trying to use a 4x4 keyboard with arduino using only one analog input. I'm currently prototyping with this Toyota Aygo Citroen C1 Peugeot Frame Fascia Dashboard Android Head Power cable | eBay though I will be getting this http://www.ebay.com/itm/like/360933932308?lpid=82. I'm using the method using two different resistor values, one linking the columns and the other linking the rows as shown here: Arduino Playground - OneWireKeypad Library. I'm believe I'm screwing up the wiring. I can't get the example associated with the OneWireKeypad library to work. I opened the serial monitor and I get different values when I press different buttons, but I'm getting a non zero value when none are pressed. The first four pins are connected with 100 ohm resistors and the last four are connected with 220 ohm resistors, and I have a 220 ohm resistor connected to ground.

Is there anything I'm explicitly doing wrong? Is anyone familiar with the 4x4 button matrix that I'm using and might be able to clarify if I've confused the pins? (Its hard to follow the trace)

Also, I've come across this other setup which seems common using all different resistor values: Arduino 3 Wire Matrix Keypad : 4 Steps - Instructables. Is there any advantage in using this method? Is one of the methods incorrect? Thanks in advance.

Your resistance is R1*(Column-1) + R2*(Row-1). I think your problem is that 1002 is very close to 2201 so Column 2 Row 2 will be very hard to tell from Column 4 Row 1.

I think you will want R2 to be considerably more than Columns*R1. Try changing your 220 Ohm resistors to something like 4700 or higher.

You can use a spreadsheet to calculate the expected outputs for different combinations of R1 and R2. Look for a combination that maximizes the difference between