DFRobot SEN:0359 Capacitive fingerprint sensor weird error
Hello,
I'm working on a fingerprint matching system that is coded using the Arduino IDE interfacing with an ESP8266 microcontroller. I've altered the registration code to also check whether the fingerprint being registered is already registered. However, whenever I include that bit of code that does the check I get an error that has the description “Command processed successfully.” I don't understand what it means and I don't understand why it occurs when I have the check code in. When I comment out the piece of checking code the registration works fine.
This is the code to check whether the fingerprint is already registered:
if ((fingerprint.collectionFingerprint(/*timeout = */ 10)) != ERR_ID809) {
fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eSlowBlink, /*LEDColor = */ fingerprint.eLEDWhite, /*blinkCount = */ 3);
while (fingerprint.detectFinger())
;
//Return 1 when finger is detected, otherwise return 0
ret = fingerprint.search();
if (ret > 0) {
fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eKeepsOn, /*LEDColor = */ fingerprint.eLEDRed, /*blinkCount = */ 0);
registered = 1;
Serial.println("User is already registered!");
} else if (ret == 0) {
/*Set fingerprint LED ring to quick blink in yellow 3 times */
fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eFastBlink, /*LEDColor = */ fingerprint.eLEDGreen, /*blinkCount = */ 3);
Serial.println("Sample successful!");
i++; //Sampling times +1
}
Any help is welcomed thanks in advance.
I'll even add the serial monitor when I comment out the fingerprint.search function, the code works as intended registering a new fingerprint:
NallsacksHI
Sorry for the inconvenience.
Could you please share a screenshot of your serial monitor? which can help us diagnose the problem,.
It seems that the module and the library is ok, that could be the error of your code, but we need more information.
Looking forward to your reply.
NeloKinHere's what's output on the serial monitor: