# include <Keypad.h>
const byte FILAS = 4; // asignamos variables FILAS, const byte es una variable solo para 8 byte
const byte COLUMNAS = 4;
char keys[FILAS] [COLUMNAS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte pinesFilas[FILAS] = {11,10,9,8};
byte pinesColumnas[COLUMNAS] = {7,6,5,4};
Keypad teclado = Keypad(makeKeymap(keys), pinesFilas, pinesColumnas, FILAS, COLUMNAS);
char key;
void setup(){
Serial.begin(9600);
}
void loop(){
key = teclado.getKey();
if(key){
Serial.println(key);
}
}