Additional Parts:
Time to Complete: 30 Minutes
- Red LED x1
- Green LED x1
- 220 Ohm Resistor x2
- 4x3 Keypad x1
- 8-pin header strip
Time to Complete: 30 Minutes

The project was fun because of the possible applications. The idea is very simple. Once a preset combination is pressed into the keypad, the red LED will turn off and the green LED will turn on. Pressing the asterisk or the pound symbol turns off the green LED and on the red LED. These characters also reset the keypad when entering a code.
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.
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.