Best way to use less pins with a keypad

Hello

Im running out of pins in my project and because of that i need some sort of way to minimize the pin usage where there are any possibility. My keypad for that matter uses 7 pins, and i would like if possible to free up some of this in some way.

Since im new to this i have no idea how i could accomplish this other than what is done in this example Arduino Playground - OneWireKeypad Library

I tried that, but the outcome is not reliable enough. The output when holding down button 1 as an example could sometimes give me 2 which is not good enough

Is there any other way?

Best way?

One way is to use the keypad with it's own dedicated pro mini.
Then send a key press via serial to your project.

Or, pick up Bobuino2, it gives you more pins.

LarryD:
Best way?

One way is to use the keypad with it's own dedicated pro mini.
Then send a key press via serial to your project.

Or, pick up Bobuino, it gives you more pins.

Sending the signal to another arduino board COULD be a solution, but i would not say its a good solution. And the Bobuino is out of the question, as this is all going to be used on a Nano later because of size issues.

Sending the signal to another arduino board COULD be a solution, but i would say its a good solution.

Kind of sounds like you already know the solution you are looking for.

LarryD:
Kind of sounds like you already know the solution you are looking for.

Sorry i missed the 'not' in that sentence .. I was supposed to write that it was not a good solution, but it might be the only one i have :slight_smile:

I have used keyboards interfaced using analog but never really had great success with that.

If you do decide the serial method, pro minis are only ~$3

Use resistors with better variation ratings, like 1%, vs 5% or 10%, then your one-wire solution will give more predictable results.
And pick resistors that provide more separation between the resulting values.

If you don't mind exchanging your keypad for an IR keypad, I am using this method these days with great success.
Only needs one pin, if you don't use the piezo speaker.
It is the BEST way :wink:

http://forum.arduino.cc/index.php?topic=317625.0

~$3.00

And it's wireless ! :art:

You are just becoming a keypad guru :wink:

What about an I2C expander chip?

You are just becoming

Using IR, I am becoming lazy.
I don't have to get up and walk to my projects any more. :roll_eyes: