The image below shows the SDK_Demo before it is opened with an Arduino on COM7 and a baud of 9600 :
Hawley’s FPS_GT511C3 Library for Arduino
Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on
installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.
To create a standalone system that can read fingerprints without the aid of a computer, you will need to replicate what the demo software does in Arduino code. Luckily there
is a fingerprint scanner Arduino library written by jhawley. The code does most of the leg work for you and handles a lot of the complicated protocol commands. You can
download it directly using the link below or find the source files on the GitHub repo.
This library is limited in functionality compared to the SDK_Demo.exe, but it gets the job done. If you look at the comments in the FPS_GT511C3’s library, certain functions
were not implemented due to the Atmega328P’s memory restrictions. Certain functions were also not needed when it was originally written. The FPS_GT511C3 library and
example code works with the GT511C3 and GT511C1R models.
The library has three examples. Each one performs a different task with the FPS:
1. Blink the white LED.
2. Enroll a fingerprint.
3. Attempt to identify the fingerprint against the local database.
Example 1: Basic Serial Test w/ FPS_Blink.ino
The FPS_Blink.ino sketch is a basic test to see if the Arduino is able to talk with the fingerprint scanner through the serial UART. As a basic sanity check, it is recommended to
test this code to make sure that your connections are correct and the scanner is able to send/receive commands. The code sets up a the Arduino’s hardware serial UART for
debugging and tells the scanner to send serial debug messages. The code also initializes the connection with the fingerprint scanner.
Once the setup is complete, the Arduino will tell the fingerprint scanner to toggle the white LED. By opening the serial monitor at 9600 baud, you should see this output:
FPS - Open
FPS - SEND: "55 AA 01 00 00 00 00 00 01 00 01 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"
FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"
FPS - LED off
FPS - SEND: "55 AA 01 00 00 00 00 00 12 00 12 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"
The code will repeat and toggle the LED while printing to the serial monitor.
Example 2: Enrolling w/ FPS_Enroll.ino
The FPS_Enroll.ino is used for enrolling a fingerprint each time the Arduino is reset. The fingerprint will save in a template within the scanner’s local database. The code will
initialize like the FPS_Blink.ino sketch. Instead of toggling the LED, the LED will remain on to scan a fingerprint. Before the end of the setup() function, it will jump to the
Enroll() function. The Enroll() function will look for an empty template ID and begin enrolling your fingerprint.
Below is what to expect in the serial monitor when enrolling a finger successfully:
Press finger to Enroll #3
Remove finger
Press same finger again
Remove finger
Press same finger yet again
Remove finger
Enrolling Successful
The scanner will reject a fingerprint if the scanner is not able to recognize your finger at anytime during the enrollment process. If your finger is not placed in the same position
like the other scans, the template will not be saved. When this happens, you will need to restart the enrollment process.
Below is what to expect when the scanner fails if the first scan does not match the second scan.