I still cant fingure out how your library file works
Could you please explain the steps in simple procedure ?
Fingerprint question
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
To enroll a fingerprint, call the following functions in order
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(1); //extract image features into buffer #1
fingerprint. getImage() //scan finger again
fingerprint. image2Tz(2) //extract image features into buffer #2
fingerprint.createModel() //create match template from features
fingerprint. storeModel(ID); //store template as ID number
To match a fingerprint, call the following functions in order:
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(); //extract image features
fingerprint.fingerFastSearch(); //perform match. Return ID.
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(1); //extract image features into buffer #1
fingerprint. getImage() //scan finger again
fingerprint. image2Tz(2) //extract image features into buffer #2
fingerprint.createModel() //create match template from features
fingerprint. storeModel(ID); //store template as ID number
To match a fingerprint, call the following functions in order:
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(); //extract image features
fingerprint.fingerFastSearch(); //perform match. Return ID.
- RAMEELALI123
- Posts: 4
- Joined: Thu Jan 26, 2017 8:21 am
Re: Fingerprint question
please help me i want to extract the geryscale image after enrolling.
- Rj_Viki
- Posts: 23
- Joined: Wed Jan 18, 2017 2:10 am
Re: Fingerprint question
Hi RAMEELALI123,
Use SFGDemo software to save the image after enrolling it .
Use SFGDemo software to save the image after enrolling it .
- Rj_Viki
- Posts: 23
- Joined: Wed Jan 18, 2017 2:10 am
Re: Fingerprint question
Is the data getting stored in Buffer 1 and Buffer 2 are image file or some other data file ?
If it is a data file , how cold I be able to print it in Serial Monitor ? what is the command to print it ?
If it is a data file , how cold I be able to print it in Serial Monitor ? what is the command to print it ?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
The sensor has one Image Buffer, and two "character buffers". The sensor performs its feature extraction algorithm on the image to build a "template" in one of the character buffers.
Don Jeronimo's software uploads the template data to the computer. I believe he also echoes it to the Serial Monitor.
Don Jeronimo's software uploads the template data to the computer. I believe he also echoes it to the Serial Monitor.
- Rj_Viki
- Posts: 23
- Joined: Wed Jan 18, 2017 2:10 am
Re: Fingerprint question
How to save image directly using the arduino code ,
Right now I am using another customized library to save image directly from the module without using the software , but that needs to run a python script to be running to save image .
Can i save the image just by using Arduino scketch ? if Yes , How to do it ?
--------------------------------------------------------------------------------------------------------------------------------
If there is any other method like How to work with the module if I am using USB to connect to my system ?
(Vcc , D+ , D- , Gnd )
- how to program the module to send a command to get image and save it in a folder
--------------------------------------------------------------------------------------------------------------------------------
This is the .cpp which to send image to PC
This is the Arduino sketch for imagetoPC
https://drive.google.com/file/d/0B-903x ... 9ONWs/view this is the library file I am using
Right now I am using another customized library to save image directly from the module without using the software , but that needs to run a python script to be running to save image .
Can i save the image just by using Arduino scketch ? if Yes , How to do it ?
--------------------------------------------------------------------------------------------------------------------------------
If there is any other method like How to work with the module if I am using USB to connect to my system ?
(Vcc , D+ , D- , Gnd )
- how to program the module to send a command to get image and save it in a folder
--------------------------------------------------------------------------------------------------------------------------------
This is the .cpp which to send image to PC
Code: Select all
// download fingerprint image to pc
uint8_t Adafruit_Fingerprint::sendImage(){
uint8_t packet[] = {FINGERPRINT_IMGUPLOAD};
writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
uint16_t len = getReply(packet);
if ((len != 1) || (packet[0] != FINGERPRINT_ACKPACKET)){
return -1;
}
Serial.print('\t'); // signifies start of data packet to pc
int count = 0; // counts the number of data packets received
while (packet[0] != FINGERPRINT_ENDDATAPACKET){
uint16_t len = getReply(packet, DATA);
count++;
if ((packet[0] != FINGERPRINT_DATAPACKET) && (packet[0] != FINGERPRINT_ENDDATAPACKET)){
return -1;
}
}
Serial.println(count); // reports number of bytes received
return 1;
}
Code: Select all
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
SoftwareSerial myser(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&myser);
void setup() {
Serial.begin(57600);
finger.begin(57600);
if (finger.verifyPassword()){
Serial.println("Fingerprint sensor detected");
}
else {
Serial.println("Sensor was not detected!");
while (1);
}
delay(100);
}
void loop() {
sendtoPC();
delay(100);
}
void sendtoPC(){
int p = -1;
Serial.println("Waiting for valid finger");
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.println(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
Serial.println("Remove finger");
delay(1000);
p = finger.sendImage();
if (p == -1){
Serial.println("Error sending image.");
}
else if (p == 1){
Serial.println("Image sent.");
}
}
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
I don't have any code that will save the image on arduino. Your sendImage function doesn't look like it does anything like that. I don't know what it's supposed to do.
- Rj_Viki
- Posts: 23
- Joined: Wed Jan 18, 2017 2:10 am
Re: Fingerprint question
Okay ,
I am using USD to Serial convertor to connect the module to my PC directly ,is it possible to give instruction and make the module respond for it ? and How to do it ?
I am using USD to Serial convertor to connect the module to my PC directly ,is it possible to give instruction and make the module respond for it ? and How to do it ?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
The sensor is controlled by commands sent over serial. This is what the adafruit library does. You will have to write a PC app that does the same thing as the Adafruit library. If you write your app in C++, you can use the adafruit code largely unchanged.
- Vishal1605
- Posts: 1
- Joined: Sun Feb 12, 2017 1:22 pm
Re: Fingerprint question
When I store one fingerprint using 'enroll' sketch, It gets store with ID#0 (irrespective of which Id I type in serial monitor) and when I try to store another fingerprint the previous fingerprint gets overwritten and new fingerprint is also stored with ID#0. Please help me How can I store multiple fingerprints using enroll sketch?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
Make sure you're using the latest version of the Fingerprint library.
Alo, make sure you have Serial Monitor set to send both CR and NL. There's a dropdown at the bottom of the serial monitor window
Alo, make sure you have Serial Monitor set to send both CR and NL. There's a dropdown at the bottom of the serial monitor window
- Rj_Viki
- Posts: 23
- Joined: Wed Jan 18, 2017 2:10 am
Re: Fingerprint question
As I was working with this fingerprint i found something that if we are using Arduino code to extract image byte data I am getting 36865 bytes.
But if I am using USBtoSerial convertor to get image byte data directly from Fingerprint module I am getting 40044 bytes where does these extra 3179 bytes comes from ?
How do i exclude them ? will these data will be in the front of at last ?
But if I am using USBtoSerial convertor to get image byte data directly from Fingerprint module I am getting 40044 bytes where does these extra 3179 bytes comes from ?
How do i exclude them ? will these data will be in the front of at last ?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Fingerprint question
Honestly, I don't know. You're far beyond what I know about the fingerprint sensor. What happens if you try to display the image data?
- aclecio_ul
- Posts: 3
- Joined: Sat Mar 04, 2017 8:15 pm
Re: Fingerprint question
How do I get back to the factory setting of the player?
Please be positive and constructive with your questions and comments.