Beginner here, I am working with the HelloKeypad example file as a start.
Input from the keypad is working, I see numbers show up on the screen when i hit the serial monitor eye glass thing.
My Question is, how does this library/example work? I want to be able to save the input from the keypad/user and store it and maybe down the line check to see if it matches a password and then light up an led or something, how can I do that?
here is the keypad code so far:
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byte rowPins[ROWS] = {8, 7, 6, 5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {4, 3, 2}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
}
void loop(){
char key = keypad.getKey();
if (key){
Serial.println(key);
}
}