Fingerprint sensor

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Fingerprint sensor

Post by SofianeSIN »

:D Hi everybody, i have a problem with a fingerprint sensor.I buy an fingerprint sensor on adafruit.com when i connect my fingerprint sensor on my arduino it works and when i connect my fingerprint sensor with the led it work as in the video tuto but when i connect my screen lcd on this as in the video tuto nothing appears. I need help pleas Thank's :D

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Fingerprint sensor

Post by adafruit_support_rick »

What sketch are you using when you connect the LCD? I believe that was something that Becky wrote for the video - I don't think we have any example sketches that talk to the LCD.

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

i used the fingerprint sketch What should I add to my program, I tried to add blibiothéque the lcd but nothing appears you can write what I should add in fingerprint sketch

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Fingerprint sensor

Post by adafruit_support_bill »

Is this the display you are using? http://learn.adafruit.com/rgb-lcd-shield
The tutorial explains how to install the library and has some example code for writing to the display.

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

Yes it is about the same except that I use a screen with SEVERAL output

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Fingerprint sensor

Post by adafruit_support_rick »

Just use as many lcd.print(), lcd.println(), and lcd.setCursor() statements as you need.

Maybe have a look at our Arduino Lesson #5. The lesson talks about the Serial Monitor, but the operations are the same with lcd.

So, wherever you see "Serial.print", substitute "lcd.print".

You can also look at the Arduino reference pages on Serial.print and Serial.println.

Again, substitute "lcd" for "Serial".

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

Hi :D @adafruit_support_rick thank's for you help you provide me i'm an amateur in arduino Could you comment on me every line Adafruit_fingerprint program please because I do not understand all the program lines Thank's :D

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

This is the program AdaFruit_fingerprint

Code: Select all

#include <Adafruit_Fingerprint.h>
#if ARDUINO >= 100
 #include <SoftwareSerial.h>
#else
 #include <NewSoftSerial.h>
#endif

int getFingerprintIDez();

// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
#if ARDUINO >= 100
SoftwareSerial mySerial(2, 3);
#else
NewSoftSerial mySerial(2, 3);
#endif

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()  
{
  Serial.begin(9600);
  Serial.println("fingertest");

  // set the data rate for the sensor serial port
  finger.begin(57600);
  
  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1);
  }
  Serial.println("Waiting for valid finger...");
}

void loop()                     // run over and over again
{
  getFingerprintIDez();
}

uint8_t getFingerprintID() {
  uint8_t p = finger.getImage();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.println("No finger detected");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK success!

  p = finger.image2Tz();
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      Serial.println("Could not find fingerprint features");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }
  
  // OK converted!
  p = finger.fingerFastSearch();
  if (p == FINGERPRINT_OK) {
    Serial.println("Found a print match!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_NOTFOUND) {
    Serial.println("Did not find a match");
    return p;
  } else {
    Serial.println("Unknown error");
    return p;
  }   
  
  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID); 
  Serial.print(" with confidence of "); Serial.println(finger.confidence); 
}

// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  return -1;
  
  // found a match!
  Serial.print("Found ID #"); Serial.print(finger.fingerID); 
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  return finger.fingerID; 
}

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Fingerprint sensor

Post by adafruit_support_rick »

SofianeSIN wrote:Hi :D @adafruit_support_rick thank's for you help you provide me i'm an amateur in arduino Could you comment on me every line Adafruit_fingerprint program please because I do not understand all the program lines Thank's :D
First question: Does it work?

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

yes it works you can comment the fingerprint program please

SofianeSIN
 
Posts: 7
Joined: Fri May 03, 2013 9:17 am

Re: Fingerprint sensor

Post by SofianeSIN »

yes it works you can comment the fingerprint program please

umer
 
Posts: 9
Joined: Sun Jul 13, 2014 3:08 am

Re: Fingerprint sensor

Post by umer »

i have same problem that posted above i'm using liquidcrystal.h library for lcd . when i connect lcd fp with arduino then fingertest only show's at the lcd and after some but not showing that Found fingerprint sensor! etc.
i don't know wiring for lcd in serial mode.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Fingerprint sensor

Post by adafruit_support_rick »

umer wrote:i have same problem that posted above
Please don't triple-post. I've answered your post on this subject here:
http://forums.adafruit.com/viewtopic.ph ... 40#p287412

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”