I think I have found a mistake in Adafruit_Fingerprint.cpp.
I have an Arduino Leonardo
On the Leonardo's fingerprint is on pin 2 and pin 3 is not correct.
With Pins 8 and 9, the communication with the fingerprint to work properly.
/ / Pin # 8 is IN from sensor (RED wire)
/ / Pin # 9 is OUT from arduino (WHITE wire)
Serial mySerial software (8, 9);
error:
If no finger on the fingerprint, the Adruino started at the end of the loop again and again.(Reset)
When a finger is scanned, the program runs correctly.
The reason I'm in the
p = uint8_t finger.getImage ();
found
is line 62:
- Code: Select all
uint8_t Adafruit_Fingerprint :: getImage (void) {
uint8_t packet [] = {FINGERPRINT_GETIMAGE};
to line 62:
- Code: Select all
uint8_t Adafruit_Fingerprint :: getImage (void) {
uint8_t packet [] = {FINGERPRINT_GETIMAGE, 0x00};
Carry this change, the Arduino runs properly with the fingerprint!
(no reset at the loop-end)
Also change:
is line 82:
- Code: Select all
uint8_t Adafruit_Fingerprint model :: create (void) {
uint8_t packet [] = {FINGERPRINT_REGMODEL};
to line 82:
- Code: Select all
uint8_t Adafruit_Fingerprint model :: create (void) {
uint8_t packet [] = {FINGERPRINT_REGMODEL, 0x00};
Also change:
is line 103:
- Code: Select all
uint8_t Adafruit_Fingerprint :: empty database (void) {
uint8_t packet [] = {FINGERPRINT_EMPTY};
to line 103:
- Code: Select all
uint8_t Adafruit_Fingerprint :: empty database (void) {
uint8_t packet [] = {FINGERPRINT_EMPTY, 0x00};
Also change:
is line 135:
- Code: Select all
uint8_t Adafruit_Fingerprint :: getTemplateCount (void) {
template count = 0xFFFF;
/ / Get number of templates in memory
uint8_t packet [] = {FINGERPRINT_TEMPLATECOUNT};
to line 135:
- Code: Select all
uint8_t Adafruit_Fingerprint :: getTemplateCount (void) {
template count = 0xFFFF;
/ / Get number of templates in memory
uint8_t packet [] = {FINGERPRINT_TEMPLATECOUNT, 0x00};
I hope that it serves some users.
much greetings
tomcom

