I am using an Audrino Uno with a fingerprint sensor and a TFT display. I have a ID counter which runs every time I run the code and the user tries to enroll a fingerprint, so this data is stored in that specific ID. For example: at the start the ID value is 1 and the first user who enrolls gets the data stored in ID1 and this goes on.
The issue I have is when I turn off the audrino or reset it, the ID value reinitiates again from 1 and erases the last fingerprint which was stored in ID=1 and stores the new fingerprint.
In order to resolve that I was thinking on using the EEPROM. I was thinking of using an counter with EEPROM address as 1 and ID as 1, so the counter keeps incrementing and storing the data in respective addresses. So I am back to the old issue where how would I continue from the last stored Address after power cycle/reset?
Can someone point out to an example?
Thanks a ton for the idea.
I was able to use that and coupled it with another logic where I could wrote sentinel value to the EEPROM locations initially say 255. Then as I handled the fingerprints I replaced that 255 with other values. When the code started, it would just scan through EEPROM looking for the first location containing 255, and that's the next one to use.