Establishing Communication Between ESP32 and R307 Fingerprint Sensor: Initialization Issues

How do I set up and establish communication between the ESP32 and the R307 fingerprint sensor, ensuring that the sensor can be recognized and initialized by the ESP32? My aim is to connect the ESP32 to the R307 fingerprint sensor and establish communication using serial interfaces. I am encountering the error Fingerprint sensor not found
#include <Adafruit_Fingerprint.h>
#include <HardwareSerial.h>

HardwareSerial mySerial(2); // Use Serial2 for communication
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
Serial.begin(115200);
mySerial.begin(57600, SERIAL_8N1, 16, 17); // RX, TX pins for ESP32

Serial.println("Initializing fingerprint sensor...");

finger.begin(57600);

if (finger.verifyPassword())
Serial.println("Fingerprint sensor initialized successfully!");
else
Serial.println("Fingerprint sensor not found, check wiring!");
}

void loop() {
// Main loop can be empty for now
}
#include <Adafruit_Fingerprint.h>
#include <HardwareSerial.h>

HardwareSerial mySerial(2); // Use Serial2 for communication
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
Serial.begin(115200);
mySerial.begin(57600, SERIAL_8N1, 16, 17); // RX, TX pins for ESP32

Serial.println("Initializing fingerprint sensor...");

finger.begin(57600);

if (finger.verifyPassword())
Serial.println("Fingerprint sensor initialized successfully!");
else
Serial.println("Fingerprint sensor not found, check wiring!");
}

void loop() {
// Main loop can be empty for now
}
1 Reply
Enthernet Code
Enthernet Code3mo ago
To establish communication between your ESP32 and the R307 fingerprint sensor, ensure that the wiring connecting the ESP32's RX (GPIO 16) to the sensor's TX, and the ESP32's TX (GPIO 17) to the sensor's RX. Also, ensure the sensor is powered correctly (either 3.3V or 5V depending on its requirements). @Boss lady
Want results from more Discord servers?
Add your server