sensor interfacing

i have wrote a program for mark attendance using fingerprint sensor but it shows the following error

Arduino: 1.6.5 (Windows 7), Board: “Arduino/Genuino Uno”

Using library Adafruit Fingerprint Sensor Library in folder: C:\Users\Selevanta\Documents\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library

Using library SoftwareSerial in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial

C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Selevanta\Documents\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library -IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial C:\Users\SELEVA~1\AppData\Local\Temp\build6820797336647781385.tmp\sketch_feb24c.cpp -o C:\Users\SELEVA~1\AppData\Local\Temp\build6820797336647781385.tmp\sketch_feb24c.cpp.o

sketch_feb24c.ino: In function ‘void setup()’:
sketch_feb24c.ino:23:14: error: ‘class Adafruit_Fingerprint’ has no member named ‘verifypassword’
sketch_feb24c.ino: At global scope:
sketch_feb24c.ino:88:1: error: expected unqualified-id before ‘switch’
‘class Adafruit_Fingerprint’ has no member named ‘verifypassword’

my code is:

<#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>

int getFingerprintEnroll(int id);

// pin #2 is IN from sensor(GREEN wire)
// pin #3 is OUT from arduino(WHITE wire)
SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
boolean verifyPassword(void);

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 the fingerprint sensor :(”);
while (1);
}

}
void loop()
{
Serial.println(“Type in the ID # u want to save this finger as…”);
int id = 0;
while (true)
{

while (! Serial.available());
char c = Serial.read();
if (! isdigit(c)) break;
id *= 10;
id += c - ‘0’;
}
Serial.print(“Enrolling ID #”);
Serial.println(id);

getFingerprintEnroll(id);

}
//int p = finger.image2Tz(1);

//}

int getFingerprintEnroll(int id)
{
int p = -1;
Serial.println(“waiting for valid finger to enroll”);
while (p != FINGERPRINT_OK)
{
p = finger.getImage();
}
switch (p)
{
case FINGERPRINT_OK:
Serial.println(“Image taken”);
break;
case FINGERPRINT_NOFINGER:
Serial.println(“no finger on sensor”);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“COMUNICATION ERROR”);
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println(“Imaging ERROR”);
break;
default:
Serial.println(“unknown ERROR”);
break;
}
}

int p = finger.image2Tz(1);
switch (p)
{
case FINGERPRINT_OK:
Serial.println(“Image converted”);
break;
case FINGERPRINT_IMAGEMESS:
Serial.println(“IMAGE TOO MESSY”);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“COMUNICATION ERROR”);
break;
case FINGERPRINT_FEATUREFAIL:
Serial.println(“could not find fingerprint features”);
return p;
default:
Serial.println(“unknown ERROR”);
Serial.println(p);
}>

class Adafruit_Fingerprint' has no member named 'verifypassword'

It does, however, have a method named verifyPassword

Please edit your post, select the code and click the code tags icon (</>) to make it easier to copy the code to an editor.

Spelling matters. So does capitalization.

All code must be in a function, and functions should not contain functions, so the quantity and placement of { and } matters also.

i have done the above correction, but now the error is

Arduino: 1.6.5 (Windows 7), Board: “Arduino/Genuino Uno”

Using library Adafruit Fingerprint Sensor Library in folder: C:\Users\Selevanta\Documents\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library

Using library SoftwareSerial in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial

C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Selevanta\Documents\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library -IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial C:\Users\SELEVA~1\AppData\Local\Temp\build8402031341885983098.tmp\sketch_feb24c.cpp -o C:\Users\SELEVA~1\AppData\Local\Temp\build8402031341885983098.tmp\sketch_feb24c.cpp.o

sketch_feb24c.ino:90:1: error: expected unqualified-id before ‘switch’
expected unqualified-id before ‘switch’

and the code is
<#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>

int getFingerprintEnroll(int id);

// pin #2 is IN from sensor(GREEN wire)
// pin #3 is OUT from arduino(WHITE wire)
SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

boolean verifyPassword(void);

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 the fingerprint sensor :(”);
while (1);
}

}
void loop()
{
Serial.println(“Type in the ID # u want to save this finger as…”);
int id = 0;
while (true)
{

while (! Serial.available());
char c = Serial.read();
if (! isdigit(c)) break;
id *= 10;
id += c - ‘0’;
}
Serial.print(“Enrolling ID #”);
Serial.println(id);

getFingerprintEnroll(id);

}
//int p = finger.image2Tz(1);

//}

int getFingerprintEnroll(int id)
{
int p = -1;
Serial.println(“waiting for valid finger to enroll”);
while (p != FINGERPRINT_OK)
{
p = finger.getImage();
}
switch (p)
{
case FINGERPRINT_OK:
Serial.println(“Image taken”);
break;
case FINGERPRINT_NOFINGER:
Serial.println(“no finger on sensor”);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“COMUNICATION ERROR”);
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println(“Imaging ERROR”);
break;
default:
Serial.println(“unknown ERROR”);
break;
}
}

int p = finger.image2Tz(1);
switch (p)
{
case FINGERPRINT_OK:
Serial.println(“Image converted”);
break;
case FINGERPRINT_IMAGEMESS:
Serial.println(“IMAGE TOO MESSY”);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“COMUNICATION ERROR”);
break;
case FINGERPRINT_FEATUREFAIL:
Serial.println(“could not find fingerprint features”);
return p;
default:

Serial.println(“unknown ERROR”);
Serial.println(p);

}

toniihrd:
i have done the above correction,

No you did not! What happend to:

UKHeliBob:
Please edit your post, select the code and click the code tags icon (</>) to make it easier to copy the code to an editor.

So please change ALL your posts to use code tags (selectable via the </> icon).

You STILL have code that is not in a function. It would be easy to see this if you used appropriate amounts of white space, in appropriate places.

#include <SoftwareSerial.h>


int getFingerprintEnroll(int id);

One blank line is plenty.

  Serial.println("fingertest");


  // set the data rate for the sensor serial port

Ditto.

  while (true)
  {


    while (! Serial.available());

NO white space is appropriate.

  getFingerprintEnroll(id);

}

Ditto.

//int p = finger.image2Tz(1);


//}

Get your f**king delete key fixed!

    default:
      Serial.println("unknown ERROR");
      break;
  }
}

This is the end of the function. EVERYTHING after this goes bye-bye (or somewhere else).