Fingerprint sensor example with WIZwiki-W7500. 1st release.

Dependencies:   GT511C3 mbed-src

Fork of GT511C3test by Toshihisa T

Revision:
6:016ad8f480d3
Parent:
5:d3ebe6d1ed92
Child:
7:8b9ef3211cd0
--- a/main.cpp	Fri Jan 03 14:37:48 2014 +0000
+++ b/main.cpp	Fri Jan 03 15:52:29 2014 +0000
@@ -1,5 +1,5 @@
 #include "mbed.h"
-#include "GT511C3.h"
+#include "GT511C3.hpp"
 
 Serial debug(USBTX,USBRX);
 
@@ -34,12 +34,19 @@
     }
 
     if(1){
-        finger.Enroll(11,progress);
+        int EnrollID = 11;
+        if(finger.CheckEnrolled(EnrollID) == 0){
+            debug.printf("EnrollID(%d) is already enrolled.Delete!\n",EnrollID);
+            if(finger.DeleteID(EnrollID) == 0){
+                debug.printf("Delete OK!\n");
+            }
+        }
+        finger.Enroll(EnrollID,progress);
     }
 
     finger.CmosLed(1);
     while(1) {
-        debug.printf("Press finger\n");
+        debug.printf("Press finger for Identify\n");
         finger.WaitPress(1);
         if(finger.Capture(1) != 0)
             continue;