#include <Keypad.h>
const int ROW_NUM = 5; //four rows
const int COLUMN_NUM = 4; //four columns
char keys[ROW_NUM][COLUMN_NUM] = {
{'1','2','3', 'A'},
{'4','5','6', 'B'},
{'7','8','9', 'C'},
{'*','0','#', 'D'},
{'E','F','G', 'H'}
};
byte pin_rows[ROW_NUM] = {14, 13, 12, 11,10}; //connect to the row pinouts of the keypad
byte pin_column[COLUMN_NUM] = {9, 46, 3, 8}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM );
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S3!");
}
void loop() {
// put your main code here, to run repeatedly:
if
char key = keypad.getKey();
if (key){
Serial.println(key);
//Keyboard.press(key);
}
delay(10); // this speeds up the simulation
}