0

1x4 Keypad
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

1x4 Keypad

by MikeSBlankenship on Thu Sep 12, 2019 11:50 pm

Hi,
I just ordered the Adafruit 1x4 Keypad from Adafruit and I am waiting for it to come in.
I already have PCB's coming back next week with the following circuit.(I could not verify because I did
not have a 1x4 keypad yet). I am using a feather MO Adalogger

Well after looking around I think I might have mis configured the layout. I have the "COMMON" input Pin1
connected to 3.3V and for the Keypad pins I have them pulled down to ground with 10K resistors. I wanted
to use the statndard Keypad.h library so I did not have to worry about debounce, but all articles I have read
(after the fact!!) show the common pin either connected to Ground or another MCU input. My schematic is attached.
Any help would be appreciated to let me know my options with the current setup thats on my PCB's that are arriving next week.

Thanks
mike

Adafruit 1x4 Keypad.JPG
Adafruit 1x4 Keypad.JPG (45.98 KiB) Viewed 67 times

MikeSBlankenship
 
Posts: 54
Joined: Sat Nov 07, 2015 5:32 pm

Re: 1x4 Keypad

by adafruit_support_bill on Fri Sep 13, 2019 5:56 am

The simplest way to wire it is to connect the common wire to ground and then enable the internal pullup resistors on the GPIO pins. That eliminates the need for external resistors. But it will work as you have it drawn also.

If this is the library you are referring to, it doesn't deal directly with the keypad, so you can wire it either way: https://www.arduino.cc/reference/en/lan ... /keyboard/

adafruit_support_bill
 
Posts: 74364
Joined: Sat Feb 07, 2009 10:11 am

Re: 1x4 Keypad

by MikeSBlankenship on Fri Sep 13, 2019 2:41 pm

Thanks for your help Bill.

This was the lib I was referring to:
https://playground.arduino.cc/Code/Keypad/

I will just write my own function to detect the Pins HIGH then
put in a while loop to look for the same pin going LOW (then execute my function)
Im thinking this will take care of my debounce issue

Thanks
mike

I

MikeSBlankenship
 
Posts: 54
Joined: Sat Nov 07, 2015 5:32 pm

Please be positive and constructive with your questions and comments.