The full code of this project can be downloaded from https://www.packtpub.com/books/content/support.
For a better understanding of the explanations in the next paragraphs, open the downloaded code while reading them.
In this project, we are going to use EEPROM to store PINS. In fact, this memory doesn't lose its content when it's not powered.
To store a PIN, we use the first character to indicate whether it is used or not and the last five characters to store the actual PIN (which is exactly five characters long). PINs are stored sequentially in EEPROM, starting from address 0.
Please refer to the downloaded code. Since the setup code is quite simple, it doesn't require a detailed explanation.
The setup code is not much different ...