compiled but not working help me out plz

#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h> // Comes with Arduino IDE
SoftwareSerial sms(2, 3);
SoftwareSerial mySerial(4, 5);// Tx, Rx
LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

int electronic_lock = 8;
int numdata;
boolean started = false;
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
bool found = 0;
bool matched = 0;
int return_id;

uint8_t id;

void setup()
{
pinMode(8, OUTPUT);
Serial.begin(9600);
while (!Serial);
delay(100);
// 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) { delay(1); }
}

finger.getTemplateCount();
Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" template(s)");
Serial.println("Waiting for valid finger...");

sms.begin(9600);
pinMode(8, OUTPUT);

lcd.begin(20, 4); // Initialize 20X4 LCD and turn on backlight
lcd.backlight();

Serial.begin(9600);
Serial.println("Adafruit finger detect test");

// 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);
}
lcd.setCursor(0, 0);
lcd.print("Biomatric Door Lock ");
lcd.setCursor(0, 1);
lcd.print(" System ");

delay(3000);
lcd.clear();

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Place the finger");

}

void loop() // run over and over again
{
getFingerprintIDez();
delay(50); //don't ned to run this at full speed.
}

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);
digitalWrite(electronic_lock, HIGH);
delay(1500); //Change the door lock delay from here
digitalWrite(electronic_lock, LOW);
Serial.println("Unlocked");
return finger.fingerID;

if (found == 1)
{
if (matched == 1)
{
lcd.setCursor(0, 1);
lcd.print("Access Granted");
digitalWrite(8, HIGH);
delay(2000);
digitalWrite(8, LOW);
sms.print("0");
}
else
{
sms.print("1");
lcd.setCursor(0, 1);
lcd.print("Access Denied");
digitalWrite(8, LOW);
}
}
else
{
lcd.setCursor(0, 0);
lcd.print("Place the finger");

lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 2);
lcd.print(" ");
lcd.setCursor(0, 3);
lcd.print(" ");
}
delay(50);
}

testing.ino (3.14 KB)

What does "not working" mean ?

Did you Read this before posting a programming question. particularly the advice on posting code ?

Do you think that perhaps telling us what your code is supposed to do and what it isn't doing or is doing wrong might help us to help you with your problems?

Steve

sorry i am a newbie..
actually the problem is my code get compiled after that its uploaded successfully in ardiuno -uno and then the lcd prints nothing after "place the fingerprint".All the component works fine.

What is printed on the Serial monitor?

The function that tries to recognize your finger begins with:

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);

If it doesn't find any match it returns -1. Otherwise, it prints the ID number found on the monitor. So what is on the monitor?

You can modify it a little like this:

int getFingerprintIDez() {
  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  return -1;

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

  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  return -3;

and change the loop as follows:

void loop()             // run over and over again
{
  Serial.println(getFingerprintIDez());
  delay(50);            //don't need to run this at full speed.
}

You'll see the returned error code printed on the serial monitor, which helps to know what error is met.