Pages: [1]   Go Down
Author Topic: SM-630 Fingerprint module  (Read 1089 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey fellas.. i'm currently working on a project and i need to deal with above 500 fingerprints..

i took help from http://tutorial.cytron.com.my/2013/01/29/interfacing-fingerprint-reader-integrated-sm630-with-arduino-uno/ but that tut dealed with 5 finger prints only..

for above 500 prints i tried to use fixed and variable part..
Code:
  byte addFingerPrint[] = {0x4D, 0x58, 0x10, 0x03, 0x40}; // 5  fixed bytes
  byte varyPart[3], highB = 0x00, lowB = 0x00;                  // 3 variable bytes
  int a2;
  varyPart[0]=highB;
  varyPart[1]=lowB;
  varyPart[2]=0x00;
  a2=0;
  while(a2<5){                                                       //while loop to add fixed bytes to checksum i.e. varyPart[2]
    varyPart[2] = varyPart[2] + addFingerPrint[a2];
    a2++;
  }
  a2 = 0;
  while(a2<2){                                                     //while loop to add variable bytes to checksum i.e. varyPart[2]
    varyPart[2] = varyPart[2]+varyPart[a2];
    a2++;
  }
  Serial.write(addFingerPrint, sizeof(addFingerPrint));   // write the 5 fixed bytes array of the command code
  Serial.write(varyPart, sizeof(varyPart));               // write the 3 variable bytes array of the command code
  delay(1000);
  correctRespond();     //function to check response of sm630
  operationSuccesful();    //function to check succcess of operation

and if operation is successful then lowB++ and highB++

but i m able to add first fingerprint at 0th position only.. then module is not rplying correctly for rest positions.. seems like increment operator is not operating properly..
how could i apply loop to deal with above 500 prints..??
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

and if operation is successful then lowB++ and highB++

I hope you mean:
Code:
lowB++;
if (lowB == 0)
    highB++;
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes..
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50362
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but i m able to add first fingerprint at 0th position only.. then module is not rplying correctly for rest positions.. seems like increment operator is not operating properly..
how could i apply loop to deal with above 500 prints..??
Start with some Serial.print()s so you know what your program IS doing.
Logged

Pages: [1]   Go Up
Jump to: