Hi every one. I'm trying to program Arduino pro micro so I can use it with FPC1020 fingerprint sensor. In example code I noticed it uses SofwareSerial, since pro micro has two hardwareserial, I've tried to change the code so it uses Serial1 instead of softwareserial:
#define swSerial Serial1
FPC1020 Finger(&swSerial);
but i got an error that says:
FPC1020:15:25: error: no matching function for call to 'FPC1020::FPC1020(HardwareSerial*)'
FPC1020 Finger(&swSerial);
^
In file included from C:\Users\Mohammad\AppData\Local\Temp\arduino_modified_sketch_475813\FPC1020.ino:7:0:
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:45:5: note: candidate: FPC1020::FPC1020(SoftwareSerial*)
FPC1020(SoftwareSerial *ser);
^
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:45:5: note: no known conversion for argument 1 from 'HardwareSerial*' to 'SoftwareSerial*'
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:41:7: note: candidate: constexpr FPC1020::FPC1020(const FPC1020&)
class FPC1020
^
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:41:7: note: no known conversion for argument 1 from 'HardwareSerial*' to 'const FPC1020&'
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:41:7: note: candidate: constexpr FPC1020::FPC1020(FPC1020&&)
C:\Users\Mohammad\Documents\Arduino\libraries\FPC1020/FPC1020.h:41:7: note: no known conversion for argument 1 from 'HardwareSerial*' to 'FPC1020&&'
exit status 1
no matching function for call to 'FPC1020::FPC1020(HardwareSerial*)'
I checked FPC1020.cpp and FPC1020.h and i found out they still uses softwareserial in these files, but i don't know how to change these files so it could be used with hardwareserial.
Can anyone help me?
FPC1020.zip (37.6 KB)