代码拉取完成,页面将自动刷新
//#if (ARDUINO >= 100)
#include "Arduino.h"
// #include <SoftwareSerial.h>
//#else
// #include "WProgram.h"
// #include <NewSoftSerial.h>
//#endif
#define FINGERPRINT_OK 0x00
#define FINGERPRINT_PACKETRECIEVEERR 0x01
#define FINGERPRINT_NOFINGER 0x02
#define FINGERPRINT_IMAGEFAIL 0x03
#define FINGERPRINT_IMAGEMESS 0x06
#define FINGERPRINT_FEATUREFAIL 0x07
#define FINGERPRINT_NOMATCH 0x08
#define FINGERPRINT_NOTFOUND 0x09
#define FINGERPRINT_ENROLLMISMATCH 0x0A
#define FINGERPRINT_BADLOCATION 0x0B
#define FINGERPRINT_DBRANGEFAIL 0x0C
#define FINGERPRINT_UPLOADFEATUREFAIL 0x0D
#define FINGERPRINT_PACKETRESPONSEFAIL 0x0E
#define FINGERPRINT_UPLOADFAIL 0x0F
#define FINGERPRINT_DELETEFAIL 0x10
#define FINGERPRINT_DBCLEARFAIL 0x11
#define FINGERPRINT_PASSFAIL 0x13
#define FINGERPRINT_INVALIDIMAGE 0x15
#define FINGERPRINT_FLASHERR 0x18
#define FINGERPRINT_INVALIDREG 0x1A
#define FINGERPRINT_ADDRCODE 0x20
#define FINGERPRINT_PASSVERIFY 0x21
#define FINGERPRINT_STARTCODE 0xEF01
#define FINGERPRINT_COMMANDPACKET 0x1
#define FINGERPRINT_DATAPACKET 0x2
#define FINGERPRINT_ACKPACKET 0x7
#define FINGERPRINT_ENDDATAPACKET 0x8
#define FINGERPRINT_TIMEOUT 0xFF
#define FINGERPRINT_BADPACKET 0xFE
#define FINGERPRINT_GETIMAGE 0x01
#define FINGERPRINT_IMAGE2TZ 0x02
#define FINGERPRINT_REGMODEL 0x05
#define FINGERPRINT_STORE 0x06
#define FINGERPRINT_EMPTY 0x0D
#define FINGERPRINT_VERIFYPASSWORD 0x13
#define FINGERPRINT_HISPEEDSEARCH 0x1B
#define FINGERPRINT_TEMPLATECOUNT 0x1D
//#define FINGERPRINT_DEBUG
#define DEFAULTTIMEOUT 5000 // milliseconds
class Fingerprint {
public:
//#if ARDUINO >= 100
// Adafruit_Fingerprint(SoftwareSerial *);
//#else
// Adafruit_Fingerprint(NewSoftSerial *);
//#endif
Fingerprint(HardwareSerial *);
void begin(uint16_t baud);
boolean verifyPassword(void);
uint8_t getImage(void);
uint8_t image2Tz(uint8_t slot = 1);
uint8_t createModel(void);
uint8_t emptyDatabase(void);
uint8_t storeModel(uint16_t id);
uint8_t fingerFastSearch(void);
uint8_t getTemplateCount(void);
void writePacket(uint32_t addr, uint8_t packettype, uint16_t len, uint8_t *packet);
uint8_t getReply(uint8_t packet[], uint16_t timeout=DEFAULTTIMEOUT);
uint16_t fingerID, confidence, templateCount;
private:
uint32_t thePassword;
uint32_t theAddress;
HardwareSerial *mySerial;
//#if ARDUINO >= 100
// SoftwareSerial *mySerial;
//#else
// NewSoftSerial *mySerial;
//#endif
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。