VR ATmega328P with R305 Fingerprint Sensor: System Hangs on finger.begin() - No Response from Sensor
hey guys, I am working with an AVR ATmega328P microcontroller and an R305 fingerprint sensor. I have connected the sensor’s TX and RX pins to the AVR’s UART pins (D0 and D1) and am utilizing SoftwareSerial for communication. However, after calling
finger.begin()
, I am not receiving any confirmation from the sensor, and the system seems to hang at that point. Despite verifying the wiring connections to be correct, and replacing the fingerprint sensor, the system continues to hang at finger.begin(57600)
. I would appreciate any guidance on what might be causing this issue.
this is my code:
Solution:Jump to solution
You are using
SoftwareSerial
on pins 2 and 3, but you're trying to communicate with the sensor using hardware UART pins (D0, D1). Either update mySerial
to use pins 0 and 1 for hardware UART, or stick with SoftwareSerial and connect the fingerprint sensor to pins 2 and 3.2 Replies
Solution
You are using
SoftwareSerial
on pins 2 and 3, but you're trying to communicate with the sensor using hardware UART pins (D0, D1). Either update mySerial
to use pins 0 and 1 for hardware UART, or stick with SoftwareSerial and connect the fingerprint sensor to pins 2 and 3.Yeah, that was an oversight 😩😩, on it.. thanks for pointing out 👍🏽