Using Matrix Keypad


Hi, I am using a raspberry pi B with a grove pi. I was wondering what the best way to connect a matrix keypad to my setup would be.

Thank You!


Hi @arnavchawla23,

I’m looking at this keypad at the moment:

The number of digital ports that you need to use with this matrix keypad are no columns + no rows = 3 + 4 = 7. Which means that you’ll need to use 7 digital ports on the GrovePi in order to accommodate the keypad.
Once you do that, you can then use that in a Python script on your Pi to process the input.

Personally, I find that to be quite a complex solution that takes you lots of ports to do one thing. In exchange for that, I’d be looking for an I2C multiplexer that can get you lots of extra IO ports while still having room for other sensors/actuators on the GrovePi. Then I’d create a grove adapter for it and plug it into the GrovePi and start using it. Here’s what I have in my mind:

Let me know what you think about that.

Thank you!