#include <Keypad.h>
const byte ROWS = 3;
const byte COLS = 3;
char hexaKeys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'}
};
byte rowPins[ROWS] = {A0, A1, A2};
byte colPins[COLS] = {A3, A4, A5};
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup() {
Serial.begin(9600);
Serial.println("salam");
}
void loop() {
char customKey = customKeypad.getKey();
if (customKey){
Serial.println(customKey);
}
}