Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
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
}
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).
@bosslady0299
CONTRIBUTE TO THIS THREAD