hakeemta / SM630-Fingerprint-for-Arduino-and-ESP8266

SM630 Fingerprint Helper Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fingerprint

SM630 Fingerprint Helper Library

This is a helper library for SM630 Fingerprint Module.

It provides a higher abstraction layer for adafruit/Adafruit-Fingerprint-Sensor-Library [https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library]

NB: This library supports Arduino/ESP8266, while the base library does not support because it does not work with SoftwareSerial. Thanks to @gilangwinduasmara for the PR [adafruit/Adafruit-Fingerprint-Sensor-Library#24]

Installation

  1. Download and place in your Arduino project library

  2. Include the header in your main program #include <Fingerprint_Helper.h>

  3. Create an instance
    Fingerprint_Helper  fingerH(&fpSerial, &FpDebug);

    Hints:
    fpSerial - can be either HardwareSerial or SoftwareSerial
    FpDebug - a simple callback for debugging

    // Debug Callback
    void FpDebug(const char* s){
      Serial.print(s);
    }

  4. Initialize fingerH.begin(57600); // SM630 default baudrate 57600

  5. Verify the presence of the module
    if(fingerH.verifyPassword()){
     // Module found
    }

Use cases:

  1. Enroll a fingerprint
    int fpId = 20;
    fingerH.enrollPrint(fpId);

  2. Identify a fingerprint
    int fpId;
    fpId = fingerH.identifyPrint();

  3. Delete a fingerprint
    fpId = 20;
    if(fingerH.deletePrint(fpId)){
     // Fingerprint 20 deleted
    }

TODO:

  1. Provide examples
  2. Document more use cases

About

SM630 Fingerprint Helper Library

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%