Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Count = 0 when templates exist #88

Open
jshep321 opened this issue Sep 29, 2020 · 5 comments
Open

Template Count = 0 when templates exist #88

jshep321 opened this issue Sep 29, 2020 · 5 comments

Comments

@jshep321
Copy link

  • Arduino board: HUZZAH32
  • Arduino IDE version 1.8.12
  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

Hi,
The output from reading sensor parameters works fine, but the Template Count is always 0.

11:47:51.015 -> Reading sensor parameters...
11:47:51.050 -> Status: 0x4
11:47:51.050 -> Sys ID: 0x0
11:47:51.050 -> Capacity: 200
11:47:51.050 -> Security level: 3
11:47:51.050 -> Device address: FFFFFFFF
11:47:51.050 -> Packet len: 128
11:47:51.050 -> Baud rate: 57600
11:47:51.050 -> Template count:0

@ladyada
Copy link
Member

ladyada commented Sep 29, 2020

hi what is the exact sensor you are using?

@jshep321
Copy link
Author

jshep321 commented Oct 2, 2020

Ah sorry... R503 (Product ID 4651).

@ladyada
Copy link
Member

ladyada commented Oct 2, 2020

ok it may not support that report. does it work otherwise

@jshep321
Copy link
Author

jshep321 commented Oct 2, 2020

yes, works quite well thanks!

From the hzgrow datasheet (ver 1.1) this appears to be supported... assuming I'm interpreting the "finger library size" correctly.
image

@caternuson
Copy link
Contributor

It's not clear what example sketch was being run here. The only example that uses getTemplateCount() is the fingerprint example, but it should produce different output than what is shown above:

finger.getTemplateCount();
if (finger.templateCount == 0) {
Serial.print("Sensor doesn't contain any fingerprint data. Please run the 'enroll' example.");
}
else {
Serial.println("Waiting for valid finger...");
Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates");
}
}

Running a modified version of the enroll sketch that adds these lines to the end of setup():

  finger.getTemplateCount();
  Serial.print(F("Template count: ")); Serial.println(finger.templateCount);

produces output with expected results:

Adafruit Fingerprint sensor enrollment
Found fingerprint sensor!
Reading sensor parameters
Status: 0x4
Sys ID: 0x0
Capacity: 200
Security level: 3
Device address: FFFFFFFF
Packet len: 128
Baud rate: 57600
Template count: 2
Ready to enroll a fingerprint!
Please type in the ID # (from 1 to 127) you want to save this finger as...

Please provide complete code listing for an example that demonstrates this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants