Time Stamp using fingerprint with WIZwiki-W7500.

Dependencies:   GT511C3 NTPClient SDFileSystem WIZnetInterface mbed-src

Fork of GT511C3_HelloWorld_WIZwiki-W7500 by WIZnet

Committer:
tosihisa
Date:
Fri Jan 03 14:37:48 2014 +0000
Revision:
5:d3ebe6d1ed92
Parent:
4:3dd0f98e6f09
Child:
6:016ad8f480d3
Add Enroll function.;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tosihisa 0:b11b455d4997 1 #include "mbed.h"
tosihisa 0:b11b455d4997 2 #include "GT511C3.h"
tosihisa 0:b11b455d4997 3
tosihisa 0:b11b455d4997 4 Serial debug(USBTX,USBRX);
tosihisa 0:b11b455d4997 5
tosihisa 0:b11b455d4997 6 DigitalOut myled(LED1);
tosihisa 0:b11b455d4997 7 GT511C3 finger(p28,p27);
tosihisa 0:b11b455d4997 8
tosihisa 5:d3ebe6d1ed92 9 int progress(int status,char *msg)
tosihisa 2:34a647292050 10 {
tosihisa 5:d3ebe6d1ed92 11 debug.printf("%s",msg);
tosihisa 3:459a4f985a45 12 return 0;
tosihisa 2:34a647292050 13 }
tosihisa 2:34a647292050 14
tosihisa 0:b11b455d4997 15 int main() {
tosihisa 0:b11b455d4997 16 int sts = 0;
tosihisa 4:3dd0f98e6f09 17 int ID = 0;
tosihisa 0:b11b455d4997 18
tosihisa 0:b11b455d4997 19 debug.format(8,Serial::None,1);
tosihisa 0:b11b455d4997 20 debug.baud(115200);
tosihisa 0:b11b455d4997 21
tosihisa 0:b11b455d4997 22 debug.printf("Open\n");
tosihisa 4:3dd0f98e6f09 23 sts = finger.Open();
tosihisa 4:3dd0f98e6f09 24 debug.printf("sts = %d\n",sts);
tosihisa 4:3dd0f98e6f09 25 if(sts == 0){
tosihisa 4:3dd0f98e6f09 26 int i;
tosihisa 4:3dd0f98e6f09 27 debug.printf("FirmwareVersion = %lx\n",finger.FirmwareVersion);
tosihisa 4:3dd0f98e6f09 28 debug.printf("IsoAreaMaxSize = %ld\n",finger.IsoAreaMaxSize);
tosihisa 4:3dd0f98e6f09 29 debug.printf("DeviceSerialNumber = ");
tosihisa 4:3dd0f98e6f09 30 for(i = 0; i < sizeof(finger.DeviceSerialNumber);i++){
tosihisa 4:3dd0f98e6f09 31 debug.printf("%02X",finger.DeviceSerialNumber[i]);
tosihisa 4:3dd0f98e6f09 32 }
tosihisa 4:3dd0f98e6f09 33 debug.printf("\n");
tosihisa 4:3dd0f98e6f09 34 }
tosihisa 0:b11b455d4997 35
tosihisa 3:459a4f985a45 36 if(1){
tosihisa 5:d3ebe6d1ed92 37 finger.Enroll(11,progress);
tosihisa 3:459a4f985a45 38 }
tosihisa 3:459a4f985a45 39
tosihisa 3:459a4f985a45 40 finger.CmosLed(1);
tosihisa 0:b11b455d4997 41 while(1) {
tosihisa 5:d3ebe6d1ed92 42 debug.printf("Press finger\n");
tosihisa 5:d3ebe6d1ed92 43 finger.WaitPress(1);
tosihisa 5:d3ebe6d1ed92 44 if(finger.Capture(1) != 0)
tosihisa 5:d3ebe6d1ed92 45 continue;
tosihisa 5:d3ebe6d1ed92 46 ID = finger.Identify();
tosihisa 5:d3ebe6d1ed92 47 debug.printf("ID = %d\n",ID);
tosihisa 5:d3ebe6d1ed92 48 debug.printf("Remove finger\n");
tosihisa 5:d3ebe6d1ed92 49 finger.WaitPress(0);
tosihisa 0:b11b455d4997 50 }
tosihisa 0:b11b455d4997 51 }