Arduino fingerprint sensor not working

I don't understand now.
If you use Esp32 with hardware serial, you need to use correct pins and modify the code.
What exact Esp32 board you have?

I tried this code but it still didn't work

#include <Adafruit_Fingerprint.h>
#include <HardwareSerial.h>

// ESP32'de UART2 pinlerini kullan
#define RX2_PIN 16
#define TX2_PIN 17

HardwareSerial mySerial(2);
Adafruit_Fingerprint parmakizi = Adafruit_Fingerprint(&mySerial);

void setup() {
  Serial.begin(9600);
  mySerial.begin(9600, SERIAL_8N1, RX2_PIN, TX2_PIN);
  
  parmakizi.begin(9600); // Baud rate'i burada belirtin
  
  if (parmakizi.verifyPassword()) {
    Serial.println("Parmakizi modülü başarıyla başlatıldı!");
  } else {
    Serial.println("Parmakizi modülü bulunamadı!");
    while (1);
  }
}

void loop() {
  Serial.println("Parmak bırakmak için hazırım...");
  
  if (parmakizi.getImage() == FINGERPRINT_OK) {
    Serial.println("Parmak algılandı!");
    
    if (parmakizi.image2Tz() == FINGERPRINT_OK) {
      Serial.println("Görüntü işlendi!");
      
      int parmakId = parmakizi.storeModel(1);
      if (parmakId == FINGERPRINT_OK) {
        Serial.println("Parmak başarıyla kaydedildi!");
      } else {
        Serial.println("Kayıt sırasında hata oluştu!");
      }
    }
  }
  
  delay(2000);
}

If you have normal Esp32 board, serial looks correct.
Try with baud rate 57600.

same error

Nothing to suggest... :neutral_face:

No problem, my friend, even your help this much is very valuable to me. I will give you the results after working on it a little more, thank you again.

I expect you updated your wiring, Tx to gpio16 and Rx to gpio17...

I tried that before you said but it didn't work.

Good luck :+1:

1 Like