Using getTemplateCount function in Adafruit_Fingerprint libr

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
SttMJ
 
Posts: 1
Joined: Wed Jan 19, 2022 5:58 am

Using getTemplateCount function in Adafruit_Fingerprint libr

Post by SttMJ »

Our project consists of using the sensor in question to store fingerprints in an orderly manner without having to manually enter the slot where they are to be stored. We think that the function getTemplateCount can help us in this task by indicating the number of fingerprints saved, and therefore, the place where we would have to save the next one. The problem we have is how to access the information that the function theoretically provides us with.

The code fragment that we think can solve the problem:

/**/
/*!
@brief Ask the sensor for the number of templates stored in memory. The
number is stored in <b>templateCount</b> on success.
@returns <code>FINGERPRINT_OK</code> on success
@returns <code>FINGERPRINT_PACKETRECIEVEERR</code> on communication error
*/
/**/
uint8_t Adafruit_Fingerprint::getTemplateCount(void) {
GET_CMD_PACKET(FINGERPRINT_TEMPLATECOUNT);

templateCount = packet.data[1];
templateCount <<= 8;
templateCount |= packet.data[2];

return packet.data[0];
}
The operation that we believe that it should have would be the following: the first person would enroll into the system and be saved on slot 1, then at the moment that the second person puts the print the function getTemplateCount, this will tell us the slots saved to save this second print in the second slot.

We do not plan to use a counter variable in the process because if for example the light is turned off (it will be used in a centre), this variable will be lost.

If you have any other way to solve this problem, please comment it too!

Thanks

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”