Arduino library for ADH-Tech fingerprint scanners
ADH-Tech of Taiwan produces fingerprint scanners for use in computing devices, including their GT-511C1R and GT-511C3, sold by many electronics retailers online as of 2015. The scanners communicate via TTL serial and sometimes USB, and operate on 3.3V or 3.3V to 6V. A computer or micro-controller can send commands to the scanner to process fingerprint images, turn on an internal LED to aid with imaging and convey information, manage an internal database of several fingerprints, or retrieve information for storage or processing.
The scanner is used by many Arduino enthusiasts, and one, Josh Hawley, has provided a library for non-commercial use that allows any Arduino to control the scanner: https://github.com/sparkfun/Fingerprint_Scanner-TTL
Josh Hawley's library and example code allow Arduinos with only one UART serial port to communicate with the scanner via "software serial" on other pins so that the UART port can be used to communicate with a host computer. Unfortunately, software serial is not as reliable as hardware serial, and I have never been able to get two different GT-511C1R scanners to communicate via software serial. So, I modified Josh Hawley's library to use the UART serial port on a Leonardo, an Arduino board with an internal serial-to-USB port to handle communications with the computer.
My successful modifications include changing any reference to Software Serial methods to Serial1 methods. When programming the Leonardo, Serial1 is the class of objects using the UART, attached to digital input/output pins 0 and 1, while Serial is the class of objects using the serial-to-USB port most often used to program the Arduino and to monitor feedback.
After checking modifications I will upload them to a fork of the library mentioned above, the fork residing at https://github.com/gsreeves/Fingerprint_Scanner-TTL