I have made a (single-room) home automation system with a mega 2560. Recently I tried to add a buzzer to the system but I kept getting this error message:
Tone.cpp.o (symbol from plugin): In function timer0_pin_port': (.text+0x0): multiple definition of
__vector_13'
libraries/IRremote/IRremote.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Mega or Mega 2560.
The problem only occurs when i use the IRremote library in combination with this line of code: " tone(buzzer, 250); "
Instead of uploading my hole code I have written this small file where the same problem occurs.
Here is the library: IRremote.zip (33.8 KB)
(my OS is linux if that matters.)
const int buzzer = 3;
#include <IRremote.h>
void setup(){
pinMode(buzzer, OUTPUT);
}
void loop(){
tone(buzzer, 250);
delay(100);
noTone(buzzer);
delay(100);
}
I am kind of a hobby programmer so I know the basics of coding (in c++) but this is the first error where I am really stuck so if you know the solution I would be very grateful to hear it!