Error by adding ISR(USART3_RX_vect)

hi
in my project ther are <Adafruit_Fingerprint.h> library.
now i need ISR(USART3_RX_vect).
when i add this ISR i get this Error .
i think error is from Adafrut librarary .

please help me !!!

Error in IDE:

WARNING: Spurious .github folder in ‘Adafruit Fingerprint Sensor Library’ library
sketch\eeprom_passworrd_\eeprom_initialize\HardwareSerial3.cpp.o: In function `__vector_54’:

sketch\eeprom_passworrd_\eeprom_initialize/HardwareSerial3.cpp:40: multiple definition of `__vector_54’

sketch\sketch_feb20a.ino.cpp.o:D:\Hossein_doc\Electronic\ok_project\Finger print my project Now\Code_fingerprint_sim900\sketch_feb20a/sketch_feb20a.ino:2378: first defined here

c:/program files (x86)/arduino/hardware/tools/avr/bin/…/lib/gcc/avr/4.8.1/…/…/…/…/avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling.

and my code is these includes:

//==================== <Include> =================================================
 
#include <Adafruit_Fingerprint.h>
#include "EEPROM.h"
#if ARDUINO >= 100
#include <SoftwareSerial.h>  
#else
#include <NewSoftSerial.h>  
#endif
//================== <Defines> ===================================================


 //EEPROM LOC   
#define Start_Time 22
#define delay_Start_Time 26
#define count_fingers_eeprom 30

#define INT0_spp 21
#define Reset_spp 4
#define green 45
#define red 44
#define Buzzer 11
#define Pump_Relay 48    //Pump Relay
#define Start_Relay 47   //Start Relay
#define OnSim900 46
#define RI 3

//================ <functions> =====================================================
uint8_t getFingerprintEnroll(uint8_t id);  
uint8_t deleteFingerprint(uint8_t id);   
uint8_t getFingerprintID(); 
int getFingerprintIDez();  
uint8_t uploadFingerpintTemplate(uint16_t id);
void led(char led_color,unsigned int waite_on,unsigned int waite_off,unsigned int frq,char c); 
long get_adad();
void change_password();
void security();
char bluetooth(boolean alphabet_char_numeric_int,boolean alphabet_char_numeric_char);
void fill_array(boolean numericInt,boolean numericChar);
void start_Relay();
void exit_disconnect();
//eeprom
long EEPROMReadlong(long address);
void EEPROMWritelong(int address, long value);


void  Identification_sim();
void Current_Sensor();
void get_Response_GSM(char firstChar,char lastChar,int First);
void Send_AT (String AT);
void get_data_sms();
void clock_GSM();
//================== <variables> =====================================================
uint8_t id =0;  
long out=0,start_time_variable=0; 
int blue,digit[40],timer1_counter,id_conv=0,i=0,saveCount=0,count=0,counter=0;
char COEFFICIENT=0,xxx=0,finger_name=0,g;
unsigned char counter_finger=0;
boolean justification=false,stored=false,Entering=false,flag_invalid=false,delete_finger_flag=false,exit_menu=false,sim_valid=false,format_valid=false,confige_sms=true,criticalEqual=false,number_valid=false;
// >> GSM                          0          1            2          3         4         5        6         7           8                 9             10          11          12         13        14          15       16          
//const String GSM_AT[17] PROGMEM={"AT+COPS?","AT+CSMINS?","AT+CBC","AT+CPOWD=1","AT+GSN","AT+GMR","AT+CNUM","AT+CPBW=","AT+CPBS=\"SM\"","AT+CPBS=\"ON\"","AT+CPBR=","AT+CCLK=","AT+CCLK?","AT+CUSD=1,\"*141*1#\"","AT+CSQ","AT+CFUN="};
const String GSM_AT_LOC[6] PROGMEM={"AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"","AT+SAPBR=3,1,\"APN\",\"internet\"","AT+SAPBR=1,1","AT+SAPBR=2,1","AT+CIPGSMLOC=1,1"};
//const String GSM_Setting[10] PROGMEM={"AT+CMGR=","AT+CSCS=","AT+CMTE=","AT+GSMBUSY=","AT+CMGL","ATE0","ATV","AT+IPR=9600","AT&W"};
//const String GSM_SMS[3] PROGMEM={"AT+CMGDA=\"DEL ALL\"","AT+CMGF=1"};
char format_pass[] ={"ABCD"};
 char response[200];
char phone[12];

Why do you have another copy of HardwareSerial3.h in... er... ANYWHERE other than buried in the Arduino core? The path to that is bizzare, and it makes me very suspicious that you've got lots of files where they're not supposed to be, not just these.

That said, you can't use the USART interrupts in your sketch. They are already used by the built-in serial classes, and you shouldn't need to use them under typical conditions, since the Serial (or in this case, Serial3) class handles receiving stuff over serial.

Also, when you have a problem, post your whole sketch, not a snippet of it. You posted a sketch that doesn't have the ISR definition that you claim you're trying to use when it doesn't compile. So it's not clear to me if you've got the ISR defined somewhere that you didn't post and that's why you're getting the error, or you're getting it without an attempt to declare the ISR in the sketch due to the issue I mentioned at the top and multiple copies of HardwareSerial3 getting pulled in somehow.

I have a drop-in replacement for HardwareSerial, called NeoHWSerial. It allows you to register a function for the RX interrupt. Note that you have to replace all occurrences of Serial with NeoSerial, and Serial3 with NeoSerial3.

You will also have to replace HardwareSerial with NeoHWSerial in the Adafruit FPS library. (Why don't they use Stream?!?)

Cheers,
/dev

/dev:
I have a drop-in replacement for HardwareSerial, called NeoHWSerial. It allows you to register a function for the RX interrupt. Note that you have to replace all occurrences of Serial with NeoSerial, and Serial3 with NeoSerial3.

You will also have to replace HardwareSerial with NeoHWSerial in the Adafruit FPS library. (Why don’t they use Stream?!?)

Cheers,
/dev

thanks for your answer.now i do that and repeleced(Serial to NeoHWSerial) and i copy library.
my IDE version : 1.6.7
now i have this error:

C:\Users\H.F Hossein\Desktop\test board\sketch_jul30a\sketch_jul30a.ino:69:28: fatal error: NeoHWNeoSerial.h: No such file or directory

#include <NeoHWNeoSerial.h>

#include <NeoHWNeoSerial.h>

I think you search-and-replaced one too many things:

    #include <NeoHWSerial.h>

Thanks "/de" my problem solved.
you are perfect .

very very thanks.

grateful :slight_smile: :slight_smile: :slight_smile: :slight_smile:
now i can recieve response from gsm sim900 .

"NeoHWSerial.h" is best library.