Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:ca4c9403dc59, committed 2019-05-23
- Comitter:
- Reavley
- Date:
- Thu May 23 11:00:08 2019 +0000
- Parent:
- 3:78667562f5f2
- Commit message:
- Final Version Fingerprint Scanner
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu May 23 10:11:51 2019 +0000
+++ b/main.cpp Thu May 23 11:00:08 2019 +0000
@@ -48,7 +48,7 @@
void lcdrightness();
void piezohz();
void alarmtime();
-void newenrol();
+void newenroll();
void menu();
void navigator();
void submenu1();
@@ -414,15 +414,32 @@
}
}
-void newenrol(){
-
+void newenroll(){
+ int f = 0;
+
+ lcd.clear();
+ lcd.printString("Scan finger",0,0);
+ lcd.printString("to login",0,1);
+ lcd.refresh();
+ finger.WaitPress(1);
+ if(finger.Capture(1) != 0){
+ ID = finger.Identify();
+ PC.printf("ID = %d \n",ID);
+ if(ID == 11){ //check if user has valid finger print
+ lcd.clear(); //if correct, access menu
+ lcd.printString("Access granted",0,0);
+ lcd.printString("Welcome! Aaron",0,1);
+ lcd.refresh();
+ PC.printf("Access granted \n");
+ wait(2.0);
+
PC.printf("Enrolling \n");// scan new finger
lcd.clear();
lcd.printString("--New Enroll--", 0,0);
lcd.printString("Press start", 0,1);
lcd.printString("to begin.", 0,2);
lcd.refresh();
- int f = 0;
+
if(start.read() == 1){ //when Start button pressed activate
PC.printf("Start \n");
@@ -462,6 +479,8 @@
wait(2.0);
}
}
+ }
+ }
finger.CmosLed(1);
if(f == 1){
login();
@@ -546,7 +565,7 @@
alarmtime();
}
if(y == 2){
- newenrol();
+ newenroll();
}
if(back == 1){