FingerReader is a python library that allows you to interact with the fingerprint sensors easily. It has been written based on the R30x fingerprint sensors and has been tested on R308. The code is inspired by pyfingerprint. You can check it out on GitHub and give me a few stars to encourage me to improve it.
Features
- Registering new fingers
- Finger validation
- Deleting the registered fingers
- Counting the registered fingers
- Erasing all fingers to make it fresh
- Signal handling
How to use it
In order to use it, connect the fingerprint sensor with a USB-TTL converter to your computer:
And install the latest version of FingerReader:
pip install FingerReader
You can interact with the fingerprint sensor using following samples. First of all, create the FingerReader instance:
from FingerReader import FingerReader
from FingerReader.exceptions import FingerExists, NoFingerFound, FingerNotFound
# Create the FingerReader instance in debug mode.
fps = FingerReader(port='COM3', debug=True)
To add a new finger, use the register method. You must put your finger two times on the sensor. The first time is for checking the existence of the finger and the other one is for the storing process:
try:
# Register the new finger
finger_id = fps.register(timeout=10)
except FingerExists as e:
# Handle the finger exists exception
pass
except NoFingerFound as e:
# Handle the no finger found on the sensor exception
pass
To validate a finger:
try:
# Waiting for the finger and validate it
finger_id, accuracy_score = fps.check_finger()
except FingerNotFound as e:
# Handle the finger not found exception
pass
except NoFingerFound as e:
# Handle the no finger found on the sensor exception
pass
To delete an existed finger:
fps.delete(position=finger_id)
To delete all the fingers:
fps.erase_fingers()
To get the number of registered fingers:
fingers_count = fps.count_fingers()
To Do:
- Finding the first available position to store the new finger
- Adding the “download image” method
- Adding the protection process for the FPS using a password
I hope you enjoy it :)