- Red LED x1
- Green LED x1
- 220 Ohm Resistor x2
- 4x3 Keypad x1
- 8-pin header strip
Time to Complete: 30 Minutes
The most difficult part of this project was determining what each pin on the keypad does. The keypad I purchased was not configured the same way at the one used in the book. With my handy-dandy multimeter, I was able to figure out the mapping for each button and rewired my circuit accordingly.
This project also introduced the concept of importing libraries into the code. In this case, it was keypad library to account for the fact that in practice, pressing a button is very rarely a binary action. The connections are not perfect so there are actually multiple pressings happening very quickly. The library tells the Arduino how to handle this situation.
It is not very hard to imagine how to extend this project to be able to externally set a new code or create a whole menu of options. A video is, of course, below.