Help With Error Code IRremote

Hello...I have received this error....code is listed below and I'm not sure what the issue is. Any help identifying the problem would be appreciated!! Thank you!

Error:

core.a(Tone.o): In function __vector_7': Tone.cpp:(.text.__vector_7+0x0): multiple definition of __vector_7'
(library file) IRremote/IRremote.o:IRremote.cpp:(.text.__vector_7+0x0): first defined here

Code:

#include <IRremote.h>
#include <Servo.h>

int IRpin = 11;
IRrecv irrecv(IRpin);
decode_results results;

Servo servoLeft;
Servo servoRight;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();

servoLeft.attach(13);
servoRight.attach(12);

}

void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value, DEC);
irrecv.resume();
}
if (results.value==16750695)
{
servoLeft.writeMicroseconds(1600);
servoRight.writeMicroseconds(1300);
delay(500);

}
else if (results.value==16726215)
{
    servoLeft.writeMicroseconds(1400);
    servoRight.writeMicroseconds(1700);
   delay(500);

}
else if (results.value==16743045)
{
    servoLeft.writeMicroseconds(1700);
    servoRight.writeMicroseconds(1490);
    delay(700);
}
else if (results.value==16724175)
{
    servoLeft.writeMicroseconds(1520);
    servoRight.writeMicroseconds(1300);
    delay(700);
    
}
else if (results.value==16712445)
{
 
Serial.println("Beep!");

tone(4,3000,1000);
delay(1000);

}

    
else 
{
    servoLeft.writeMicroseconds(1500);
    servoRight.writeMicroseconds(1500);
    delay(1000);
    
}

}

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

The error indicates that the same interrupt vector (__vector_7) is being used by the tone() library and the IRremote() library

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.