Fingerprint_Scanner-TTL
Fingerprint_Scanner-TTL copied to clipboard
False positives in FPS_Enroll.ino
When using the FPS_Enroll.ino sketch in a project of mine, I noticed that I would get false positives while enrolling prints. For example, I would scan my index finger twice, then my thumb for the third scan. I receive "Enrolling Successful" because Enroll3() returns a 0. It seems this function has no regard to the previous two scans, so it returns a 0 only because it read a finger correctly, not because it actually enrolled a complete profile.
What I did to overcome this was simple. At the beginning of the enrollment process, I use the GetEnrollCount() function to query the number of enrollments saved in the FPS and save it as a variable enrollcount. Following Enroll3(), I use GetEnrollCount() a second time and save it as newenrollcount.
By comparing newenrollcount to enrollcount, I can see if a new enrollment was actually saved (vs just checking if three scans were successful) because newenrollcount will be a greater number.
That is a great idea. I will see about updating the code for the Enroll sample.