#include <Keypad.h>

char tombol [4][4] =
{
  {'1','2','3','a'},
  {'4','5','6','b'},
  {'7','8','9','c'},
  {'*','0','#','d'}
};

byte baris[]={9,8,7,6};
byte kolom[]={5,4,3,2};

Keypad keypad = Keypad(makeKeymap(tombol),baris,kolom,4,4);

void setup() {

  Serial.begin(9600);

}

void loop() {
  char kode = keypad.getKey();

  if(kode != NO_KEY){
    Serial.println(kode);
  }

}