diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-05-03 20:49:58 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-05-03 20:51:14 +0800 |
| commit | 7f5a4782dc5428884dd1b7163196ff7363fb15d7 (patch) | |
| tree | ce06905c0ce24222ea2536b1c1c63b8ddbd3b64f /main.c | |
| parent | d04b071a2bdfb1ed87c750416aab4424202353af (diff) | |
| download | avr-fpm-drivers-7f5a4782dc5428884dd1b7163196ff7363fb15d7.tar.gz | |
Update readme.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 38 |
1 files changed, 16 insertions, 22 deletions
@@ -100,30 +100,24 @@ int main(void) snprintf(s, 30, "Template count: %d", template_count); uart_write(s); - uart_write("Enroll fingerprint"); - _delay_ms(2000); - if (fpm_enroll()) { - uart_write("Enrolled fingerprint"); - } else { - uart_write("Enrollment error"); + if (template_count == 0) { + uart_write("Enroll fingerprint"); + if (fpm_enroll()) { + uart_write("Enrolled fingerprint"); + } else { + uart_write("Enrollment error"); + } + + template_count = fpm_getcount(); + snprintf(s, 30, "New template count: %d", template_count); + uart_write(s); } - template_count = fpm_getcount(); - snprintf(s, 30, "New template count: %d", template_count); - uart_write(s); - - //uart_write("Authentcate"); - //_delay_ms(1000); - // - //do { - // ismatch = fpm_match(); - // if (ismatch) - // uart_write("Matched!"); - // else { - // uart_write("No match!"); - // _delay_ms(1500); - // } - //} while (!ismatch); + uart_write("Authentcating..."); + if (fpm_match()) + uart_write("Fingerprint match"); + else + uart_write("No match"); } while (1) |
