adafruit_fingerprint
¶
This library will let you use an Adafruit Fingerprint sensor on any UART to get, store, retreive and query fingerprints! Great for adding bio-sensing security to your next build.
Author(s): ladyada
Implementation Notes¶
Hardware:
Fingerprint sensor (Product ID: 751)
Panel Mount Fingerprint sensor (Product ID: 4651)
Software and Dependencies:
Adafruit CircuitPython firmware (2.2.0+) for the ESP8622 and M0-based boards: https://github.com/adafruit/circuitpython/releases
- class adafruit_fingerprint.Adafruit_Fingerprint(uart: UART, passwd: Tuple[int, int, int, int] = (0, 0, 0, 0))[source]¶
UART based fingerprint sensor.
- check_module() bool [source]¶
Checks the state of the fingerprint scanner module. Returns OK or error.
- compare_templates() int [source]¶
Compares two fingerprint templates in char buffers 1 and 2. Stores the confidence score in self.finger_id and self.confidence. Returns the packet error code or OK success
- count_templates() int [source]¶
Requests the sensor to count the number of templates and stores it in
self.template_count
. Returns the packet error code or OK success
- create_model() int [source]¶
Requests the sensor take the template data and turn it into a model returns the packet error code or OK success
- delete_model(location: int) int [source]¶
Requests the sensor delete a model from flash memory given by the argument location. Returns the packet error code or OK success
- empty_library() int [source]¶
Requests the sensor to delete all models from flash memory. Returns the packet error code or OK success
- finger_fast_search() int [source]¶
Asks the sensor to search for a matching fingerprint template to the last model generated. Stores the location and confidence in self.finger_id and self.confidence. Returns the packet error code or OK success
- finger_search() int [source]¶
Asks the sensor to search for a matching fingerprint starting at slot 1. Stores the location and confidence in self.finger_id and self.confidence. Returns the packet error code or OK success
- get_fpdata(sensorbuffer: str = 'char', slot: int = 1) List[int] [source]¶
Requests the sensor to transfer the fingerprint image or template. Returns the data payload only.
- get_image() int [source]¶
Requests the sensor to take an image and store it memory, returns the packet error code or OK success
- image_2_tz(slot: int = 1) int [source]¶
Requests the sensor convert the image to a template, returns the packet error code or OK success
- load_model(location: int, slot: int = 1) int [source]¶
Requests the sensor to load a model from the given memory location to the given slot. Returns the packet error code or success
- read_templates() int [source]¶
Requests the sensor to list of all template locations in use and stores them in self.templates. Returns the packet error code or OK success
- send_fpdata(data: List[int], sensorbuffer: str = 'char', slot: int = 1) bool [source]¶
Requests the sensor to receive data, either a fingerprint image or a character/template data. Data is the payload only.
- set_led(color: int = 1, mode: int = 3, speed: int = 128, cycles: int = 0) int [source]¶
LED function – only for R503 Sensor. Parameters: See User Manual for full details color: 1=red, 2=blue, 3=purple mode: 1-breathe, 2-flash, 3-on, 4-off, 5-fade_on, 6-fade-off speed: animation speed 0-255 cycles: numbe of time to repeat 0=infinite or 1-255 Returns the packet error code or success