Keypad construction

I cannot find proper category...
In my project I've used simple standard four-buttons matrix keypad - driven by Keypad library.
Now, I think about appearance - maybe it will be good to use something else instead the keypad. So - is such keypad just a set of cables, which are contacted to get button presses? May I just use instead my own wires just like that (and make some kind of custom buttons), or maybe I need some resistors or anything else between the wires?

For a 4 button keypad where only a single button will be pressed and detected at a time all you need is two column wires and two row wires.

The 4 buttons are arranged to connect their associated row and column wires together and this is detected using the Keypad library. No resistors or diodes are needed

That was my question - whether I need some resistors.
My 4 buttons keypad is 1x4, so I need 5 wires. I'll try to find something more beautiful instead of the keypad.

Why not treat the keypad as a 2x2 device even if the keys are laid out in a single row of 4 ?

Good point. When I invent some other "hardware" solution I can spare 1 pin this way. Thanks for this advice.
As long as I use the current keypad it will stay with 5 wires.

Out of interest, which Arduino board are you using ?

1 Like

TBH, it's not Arduino itself - it is Wemos D1 Wifi.
My project is desk lamp with wifi support: on, off and brightness on two separate LED strips - one warm for daily use and another - cold and brighter for precision work.
So ESP8266 is good choice, and this Wemos board is like ESP interface.
Maybe in final project I'll take ESP itself, which is much smaller, but it means I need to separate additional power line (3.3V) from current 12V.

However I still have free pins, its 12E version, not the smallest 8-pins module.

The reason that I asked was because I wondered if you were using an ESP32 and could, therefore, use touch sensors

1 Like

As far as I know it's impossible with ESP, at least with analog pins - I have only one. I didn't work with touch sensor modules, but I have no place for them - about 2 centimeters of 1x4 keypad height is everything I have.

The point is that the ESP32 has dedicated touch sensor pins whereas the ESP8266 doesn't

1 Like

Ohh, I didn't know. Probably I have ESP32 somewhere deep in my box. Need to check, thanks for idea.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.