-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFingerprintSensorLib.h
More file actions
71 lines (53 loc) · 1.93 KB
/
Copy pathFingerprintSensorLib.h
File metadata and controls
71 lines (53 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/****************************************************************************
This lib is under the GPU, General Public Licence, feel free to dowload it and modify
at your will. I`ll let some intructions grabed from the manual in a more didatic
way for beginers as me, since I had to strugle I little bit to start creating this lib.
If you downloaded this lib from an external souce, please come visit the original link
of its repository on my GitHUb -->
**************************** HAVE FUN !!! *************************************/
#ifndef _FINGERPRINTSENSORLIB_h
#define _FINGERPRINTSENSORLIB_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#ifdef __AVR__
#include <SoftwareSerial.h>
#endif
// Let it defined is you want to see the Incoming and outging packets, plus more helpfull information to the debug process
// #define debug
class FingerprintSensorLibClass
{
public:
FingerprintSensorLibClass(SoftwareSerial *);
FingerprintSensorLibClass(HardwareSerial *);
bool init(uint32_t baudRate);
bool start(void);
bool pegarImagem(void);
bool img2tz(byte param);
bool criarModelo(void);
bool pegarModelo(char*);
bool excluirDB(void);
//bool upImagem(void);
protected:
/*
These functions are responsible for sending the right intructions to
the finger print Sensor via Serial Write. They are very simple, but not to
be messe with, since it last column in the arrays is the aritimetic sum of the
bytes, in HEX format, inside each column
*/
void FINGERPRINT_START(void);
void FINGERPRINT_GET_IMAGE();
void FINGERPRINT_2_TZ(byte param);
void FINGERPRINT_GEN_TEMPLATE(void);
void FINGERPRINT_GET_TEMPLATE(void);
void FINGERPRINT_DELETE_ALL(void);
private:
Stream *actSerial; // Actual Serial, a pointer that points to the actual Serial object used by the finger print sensor
#ifdef __AVR__
SoftwareSerial *softSerial;
#endif
HardwareSerial *hardSerial;
};
#endif