PinoutSearch

4x4 Matrix Keypad

16 buttons read through just 8 pins as a row/column grid.

How it works

A matrix keypad wires its buttons in a grid so 16 keys need only 8 pins (4 rows + 4 columns) instead of 16. The Arduino scans it: drive one row at a time and read which column responds to find the pressed key.

The Keypad library does all the scanning — you just map the grid to characters and call getKey().

Pins

R1–R4
Row pins — to four digital pins.
C1–C4
Column pins — to four digital pins.

Ratings

Keys
16 (4×4)
Pins
8 (4 rows + 4 columns)

Tips

  • Use the Keypad library and define the key layout in code.
  • Pin order along the connector varies — check your keypad before wiring.