ESP32 PSRAM Timer Camera X, FINGERPRINT
Lubos229 opened this issue · comments
Describe the bug
library is not working properly. all details : https://www.esp32.com/viewtopic.php?p=127295#
Some help please ?
To reproduce
#include "M5_FPC1020A.h"
FingerPrint Finger;
void setup() {
Serial.begin(115200);
uint8_t rx = 13;
uint8_t tx = 4;
Serial1.begin(19200, SERIAL_8N1, rx, tx);
uint8_t TxBuf[6] = {0, 1, 0, 1, 1, 0};
uint8_t checkSum = 0;
Serial1.write(0xF5);
for (int i = 1; i < 6; i++) {
Serial1.write(TxBuf[i]);
checkSum ^= TxBuf[i];
}
Serial1.write(checkSum);
Serial1.write(0xF5);
Serial1.flush();
Serial.println("Command sent");
}
/*
uint8_t addUserResult = Finger.fpm_addUser(1, 1);
if (addUserResult == ACK_SUCCESS) {
Serial.println("User added successfully!");
} else {
Serial.print("Failed to add user. Error code: ");
Serial.println(addUserResult);
}
// Compare fingerprints
uint8_t compareResult = Finger.fpm_compareFinger();
if (compareResult == ACK_SUCCESS) {
Serial.println("Fingerprints match!");
} else if (compareResult == ACK_NOUSER) {
Serial.println("No fingerprints enrolled.");
} else if (compareResult == ACK_TIMEOUT) {
Serial.println("Fingerprint matching timeout.");
} else {
Serial.print("Fingerprints do not match. Error code: ");
Serial.println(compareResult);
}
delay(10000);
*/
void loop() {
while (Serial1.available()) {
Serial.printf("%X\n", Serial1.read());
}
delay(10);
}
Expected behavior
I want my fingerprint to work well and not just 1 time out of a hundred. I need to register a fingerprint and then verify if it is the user
Screenshots
No response
Environment
- OS:
- IDE &IDE Version:
- Repository Version:
Additional context
void loop() {
// Print the current add mode
Serial.println(Finger.fpm_readAddMode());
// Add a user with user number 21 and permission 1
uint8_t addUserResult = Finger.fpm_addUser(21, 1);
// Print the result of adding the user
Serial.print("Add user result: ");
Serial.println(addUserResult);
// Print additional details for debugging
for (int i = 0; i < 9; i++) {
Serial.print("RxBuf[");
Serial.print(i);
Serial.print("]: ");
Serial.println(Finger.RxBuf, HEX);
}
output when the finger is not placed on the fingerprint:
1
Add user result: 1
RxBuf[0]: FF
RxBuf[1]: 0
RxBuf[2]: 0
RxBuf[3]: 0
RxBuf[4]: 0
RxBuf[5]: 0
RxBuf[6]: 0
RxBuf[7]: 0
RxBuf[8]: 0
output when the finger is placed on the fingerprint:
Add user result: 1
RxBuf[0]: FF
RxBuf[1]: FF
RxBuf[2]: FF
RxBuf[3]: FF
RxBuf[4]: FF
RxBuf[5]: FF
RxBuf[6]: FF
RxBuf[7]: FF
RxBuf[8]: 0
he code I sent you above output (RxBuf[0]: FF RxBuf[1]: FF RxBuf[2]: FF RxBuf[3]: FF RxBuf[4]: FF RxBuf[5]: FF RxBuf[6]: FF RxBuf[7]: FF RxBuf[8]: 0).
when I try to test 100x by putting my finger... I have Add user result: 0 but the chance is 1/100.
User added successfully!
RxBuf[0]: F5
RxBuf[1]: 3
RxBuf[2]: 0
RxBuf[3]: 0
RxBuf[4]: 0
RxBuf[5]: 0
RxBuf[6]: 3
RxBuf[7]: F5
RxBuf[8]: 0
Issue checklist
- I searched for previous reports in the issue tracker
- My report contains all necessary details