-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFingerprint.ino
More file actions
34 lines (28 loc) · 793 Bytes
/
Fingerprint.ino
File metadata and controls
34 lines (28 loc) · 793 Bytes
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
#include <SoftwareSerial.h>
#include "finger.h"
void setup()
{
// Open serial communications (connect to PC) and wait for port to open:
Serial.begin(115200);
while (!Serial)
{
; // wait for serial port to connect. Needed for native USB port only
}
pinMode(Finger_RST_Pin , OUTPUT);
digitalWrite(Finger_RST_Pin , LOW);
delay(100);
digitalWrite(Finger_RST_Pin , HIGH);
pinMode(Finger_WAKE_Pin , INPUT);
Finger_SoftwareSerial_Init();
Finger_Wait_Until_OK();
}
void loop()
{
Analysis_PC_Command();
// If in sleep mode, turn on the auto wake-up function of the finger,
//begin to check if the finger is pressed, and wake up the module and match it
if(Finger_SleepFlag == 1)
{
Auto_Verify_Finger();
}
}