Arduino Leonardo - Electronic Lock
Placed onThe keypad
For the keypad to work we can use the keypad library. The library is easy to use and initialize.
To initialize the keypad library we first have to specify how many rows and collums there are on the keypad, then we have to make a KeyMap. This means that we have to tell the library where every key is located on the keypad itself. After that we have to specify where we connected the keypad on the Arduino .
The Initialization of the keypad library
Then to use the keypad, we have to make a function that checks if we have a keypress.