Arduino UNO R3 Compatible using CH340T

  13.00 JD                     Add to cart

4 x 4 keypad

    3.00 JD                      Add to cart

4x4 Keypad Interface

 Keypad is one of the most common components for human-computer interface. one of the best methods to build a Keypad is to use a matrix keypad we will show how to use a 4 x4 keypad with keypad library Arduino. Matrix keypad has pins for each row and each column. so our 4x4 keypad has 8 pins.


Keypad pins 1,2,3 and 4 present the rows of the key pad and the are connected to digital pins 2,3,4, and 5 while the ther pins presents the columns. 



Download Keypad Libarary 

include <Keypad.h>
const byte ROWS = 4;
const byte COLS = 4;                                                          
//define the symbols on the buttons of the keypads
char Keys[ROWS][COLS] =
byte rowPins[ROWS] = {2,3,4,5};
byte colPins[COLS] = {6,7,8,9};
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad(makeKeymap(Keys),rowPins,colPins,ROWS,COLS);
void setup()
  Serial.println("Please press the keyboard:");
void  loop()
  char key = customKeypad.getKey();
    Serial.print("Key Value : ");