David Bruce 15597305
Dependencies: mbed N5110 GT511C3
Diff: main.cpp
- Revision:
- 1:4c720110a2a8
- Parent:
- 0:4bbfc068d864
- Child:
- 2:61e0f5bec6ff
diff -r 4bbfc068d864 -r 4c720110a2a8 main.cpp --- a/main.cpp Tue Dec 01 18:20:31 2015 +0000 +++ b/main.cpp Tue Dec 01 20:49:44 2015 +0000 @@ -4,7 +4,7 @@ Serial debug(USBTX,USBRX); DigitalOut myled(LED1); -GT511C3 finger(p28,p27); +GT511C3 finger(p9,p10); int progress(int status,char *msg) { @@ -36,11 +36,14 @@ debug.printf("\n"); } - finger.DeleteAllIDs(); + int EnrollID = -1; + unsigned char data[498]; + debug.printf("Deleting IDs = %d\n", finger.DeleteAllIDs()); finger.Enroll(EnrollID,progress); - unsigned char data[496]; - finger.SetTemplate(11,data,496); + debug.printf("RecvData = %d\n", finger.RecvData(data, 498)); + debug.printf("Data[0-3] = %X %X %X %X\n", data[0], data[1],data[2],data[3]); + debug.printf("SetTemplate = %d\n", finger.SetTemplate(11,data,498)); finger.CmosLed(1); @@ -50,7 +53,7 @@ if(finger.Capture(1) != 0) continue; ID = finger.Identify(); - debug.printf("ID = %d\n",ID); + debug.printf("ID = %d\n",ID); debug.printf("Remove finger\n"); finger.WaitPress(0); }