Program for R306 fingerprint module interfaced with Wiz750SR S2E device

Dependencies:   FPC_R306 MQTT WIZnetInterface mbed

Fork of GT511C3_TimeStamp_WIZwiki-W7500 by WIZnet

Committer:
tosihisa
Date:
Fri Jan 03 06:34:26 2014 +0000
Revision:
1:4a1be9379e92
Parent:
0:b11b455d4997
Child:
2:34a647292050
enum ????;

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 0:b11b455d4997 9 int main() {
tosihisa 0:b11b455d4997 10 unsigned long Parameter;
tosihisa 0:b11b455d4997 11 unsigned short Response;
tosihisa 0:b11b455d4997 12 int sts = 0;
tosihisa 1:4a1be9379e92 13 int count = 0;
tosihisa 0:b11b455d4997 14
tosihisa 0:b11b455d4997 15 debug.format(8,Serial::None,1);
tosihisa 0:b11b455d4997 16 debug.baud(115200);
tosihisa 0:b11b455d4997 17
tosihisa 0:b11b455d4997 18 debug.printf("Init\n");
tosihisa 0:b11b455d4997 19 finger.Init();
tosihisa 0:b11b455d4997 20 debug.printf("Open\n");
tosihisa 0:b11b455d4997 21 finger.SendCommand(0,GT511C3::CMD_Open);
tosihisa 0:b11b455d4997 22 sts = finger.RecvResponse(&Parameter,&Response);
tosihisa 0:b11b455d4997 23 debug.printf("sts = %d,Response=0x%04x\n",sts,Response);
tosihisa 0:b11b455d4997 24
tosihisa 0:b11b455d4997 25 while(1) {
tosihisa 1:4a1be9379e92 26 debug.printf("Led\n");
tosihisa 1:4a1be9379e92 27 finger.SendCommand(count & 1,GT511C3::CMD_CmosLed);
tosihisa 1:4a1be9379e92 28 sts = finger.RecvResponse(&Parameter,&Response);
tosihisa 1:4a1be9379e92 29 debug.printf("sts = %d,Response=0x%04x\n",sts,Response);
tosihisa 0:b11b455d4997 30 myled = 1;
tosihisa 1:4a1be9379e92 31 wait(0.5);
tosihisa 0:b11b455d4997 32 myled = 0;
tosihisa 1:4a1be9379e92 33 wait(0.5);
tosihisa 1:4a1be9379e92 34 count++;
tosihisa 0:b11b455d4997 35 }
tosihisa 0:b11b455d4997 36 }