GithubHelp home page GithubHelp logo

fpm10a's Introduction

转载请注明出处

使用的Libraey

Adafruit Fingerprint Sensor Library

可能需要的工具

PuTTY

功能一览

  1. 添加指纹
  2. 识别指纹
  3. 清空指纹
  4. 删除指纹
  5. 修改数据库密码

公开函数表

1.Instantiates sensor with Software/Hardware Serial
-> ss/hs Pointer to HardwareSerial object
-> password 32-bit integer password (default is 0)
Adafruit_Fingerprint::Adafruit_Fingerprint(SoftwareSerial *ss, uint32_t password)
Adafruit_Fingerprint::Adafruit_Fingerprint(HardwareSerial *hs, uint32_t password)

2.Initializes serial interface and baud rate
-> baudrate Sensor's UART baud rate (usually 57600, 9600 or 115200)
void Adafruit_Fingerprint::begin(uint32_t baudrate)

3.Verifies the sensors' access password (default password is 0x0000000).
A good way to also check if the sensors is active and responding
-> returns True if password is correct
boolean Adafruit_Fingerprint::verifyPassword(void)
uint8_t Adafruit_Fingerprint::checkPassword(void)

4.Ask the sensor to take an image of the finger pressed on surface
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_NOFINGER if no finger detected
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
-> returns FINGERPRINT_IMAGEFAIL on imaging error
uint8_t Adafruit_Fingerprint::getImage(void)

5.Ask the sensor to convert image to feature template
-> slot Location to place feature template (put one in 1 and another in 2 for verification to create model)
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_IMAGEMESS if image is too messy
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
-> returns FINGERPRINT_FEATUREFAIL on failure to identify fingerprint features
-> returns FINGERPRINT_INVALIDIMAGE on failure to identify fingerprint features
uint8_t Adafruit_Fingerprint::image2Tz(uint8_t slot)

6.Ask the sensor to take two print feature template and create a model
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
-> returns FINGERPRINT_ENROLLMISMATCH on mismatch of fingerprints
uint8_t Adafruit_Fingerprint::createModel(void)

7.Ask the sensor to store the calculated model for later matching
-> location The model location
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_BADLOCATION if the location is invalid
-> returns FINGERPRINT_FLASHERR if the model couldn't be written to flash memory
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::storeModel(uint16_t location)

8.Ask the sensor to load a fingerprint model from flash into buffer 1
-> location The model location
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_BADLOCATION if the location is invalid
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::loadModel(uint16_t location)

9.Ask the sensor to transfer 256-byte fingerprint template from the buffer to the UART
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::getModel(void)

10.Ask the sensor to delete a model in memory
-> location The model location
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_BADLOCATION if the location is invalid
-> returns FINGERPRINT_FLASHERR if the model couldn't be written to flash memory
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::deleteModel(uint16_t location)

11.Ask the sensor to delete ALL models in memory
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_BADLOCATION if the location is invalid
-> returns FINGERPRINT_FLASHERR if the model couldn't be written to flash memory
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::emptyDatabase(void)

12.Ask the sensor to search the current slot 1 fingerprint features to match saved templates.
The matching location is stored in fingerID and the matching confidence in confidence
-> returns FINGERPRINT_OK on fingerprint match success
-> returns FINGERPRINT_NOTFOUND no match made
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::fingerFastSearch(void)

13.Ask the sensor for the number of templates stored in memory.
The number is stored in templateCount on success.
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::getTemplateCount(void)

14.Set the password on the sensor
-> password 32-bit password code
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_PACKETRECIEVEERR on communication error
uint8_t Adafruit_Fingerprint::setPassword(uint32_t password)

15.Helper function to process a packet and send it over UART to the sensor
-> packet A structure containing the bytes to transmit
void Adafruit_Fingerprint::writeStructuredPacket(const Adafruit_Fingerprint_Packet & packet)

16.Helper function to receive data over UART from the sensor and process it into a packet
-> packet A structure containing the bytes received
-> timeout how many milliseconds we're willing to wait
-> returns FINGERPRINT_OK on success
-> returns FINGERPRINT_TIMEOUT or FINGERPRINT_BADPACKET on failure
uint8_t Adafruit_Fingerprint::getStructuredPacket(Adafruit_Fingerprint_Packet * packet, uint16_t timeout)

fpm10a's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

weisiong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.