Version 1.0

Dependencies:   4DGL-uLCD-SE GT511C3 SDFileSystem mbed

Fork of GT511C3_demo by Eugene Gonzalez

Files at this revision

API Documentation at this revision

Comitter:
beanmachine44
Date:
Tue Dec 01 18:20:31 2015 +0000
Child:
1:4c720110a2a8
Commit message:
Initial commit;

Changed in this revision

GT511C3.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GT511C3.lib	Tue Dec 01 18:20:31 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/beanmachine44/code/GT511C3/#aa0bd9bd1c56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 01 18:20:31 2015 +0000
@@ -0,0 +1,57 @@
+#include "mbed.h"
+#include "GT511C3.hpp"
+ 
+Serial debug(USBTX,USBRX);
+ 
+DigitalOut myled(LED1);
+GT511C3 finger(p28,p27);
+ 
+int progress(int status,char *msg)
+{
+    debug.printf("%s",msg);
+    return 0;
+}
+ 
+int main() {
+    int sts = 0;
+    int ID = 0;
+ 
+    debug.format(8,Serial::None,1);
+    debug.baud(115200);
+ 
+    debug.printf("Fingerprint reader module \"GT-511C3 / GT-511C31\" test program.\n");
+    debug.printf("Build: %s %s\n",__DATE__,__TIME__);
+ 
+    debug.printf("Open\n");
+    sts = finger.Open();
+    debug.printf("sts = %d\n",sts);
+    if(sts == 0){
+        int i;
+        debug.printf("FirmwareVersion = %lx\n",finger.FirmwareVersion);
+        debug.printf("IsoAreaMaxSize = %ld\n",finger.IsoAreaMaxSize);
+        debug.printf("DeviceSerialNumber = ");
+        for(i = 0; i < sizeof(finger.DeviceSerialNumber);i++){
+            debug.printf("%02X",finger.DeviceSerialNumber[i]);
+        }
+        debug.printf("\n");
+    }
+ 
+    finger.DeleteAllIDs();
+    int EnrollID = -1;
+    finger.Enroll(EnrollID,progress);
+    unsigned char data[496];
+    finger.SetTemplate(11,data,496);
+    
+ 
+    finger.CmosLed(1);
+    while(1) {
+        debug.printf("Press finger for Identify\n");
+        finger.WaitPress(1);
+        if(finger.Capture(1) != 0)
+            continue;
+        ID = finger.Identify();
+        debug.printf("ID = %d\n",ID); 
+        debug.printf("Remove finger\n");
+        finger.WaitPress(0);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 01 18:20:31 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file