Error: No matching function for call to

Hey,
So I'm working on a science project. I found this code for a project on Github and when trying to verify it, it gives me the error: No matching function for call to 'Adafruit_Fingerprint::Adafuit_Fingerprint(SoftwareSerial)'
Any help would be appreciated but, please speak english.
:slight_smile:

#include <Servo.h>
#include <Adafruit_NeoPixel.h>
#include <Adafruit_Fingerprint.h>
#if ARDUINO >= 100
#include <SoftwareSerial.h>
#else
#include <NewSoftSerial.h>
#endif
#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, 6, NEO_GRB + NEO_KHZ800);

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

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

The library is probably expecting a pointer to a hardware serial object, and doesn't know what to do with a SoftwareSerial object pointer.

Please remember to use code tags when posting code.

AWOL:
The library is probably expecting a pointer to a hardware serial object, and doesn't know what to do with a SoftwareSerial object pointer.

Umm, here's the start of one of Adafruit's example sketches included with the fingerprint library:

#include <Adafruit_Fingerprint.h>

// On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white
// uncomment this line:
// #define mySerial Serial1

// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// comment these two lines if using hardware serial
SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()  
{

Pointer to software serial should be OK.

I see your point (I don't have the library) but the compiler seems to disagree.

Which board are you using?

class Adafruit_Fingerprint {
 public:
#if defined(__AVR__) || defined(ESP8266)
  Adafruit_Fingerprint(SoftwareSerial *ss, uint32_t password = 0x0);
#endif
  Adafruit_Fingerprint(HardwareSerial *hs, uint32_t password = 0x0);

ERRoR IS:no matching function for call to 'Adafruit_Fingerprint::Adafruit_Fingerprint(SoftwareSerial*)'

how to solve this error

gopalreddy:
ERRoR IS:no matching function for call to 'Adafruit_Fingerprint::Adafruit_Fingerprint(SoftwareSerial*)'

how to solve this error

Read the comment directly above yours. I'm willing to bet you're not using an AVR. If that's the case, then you can't use SoftwareSerial with this class.