-1

I am doing code for IR sensor. My problem is when I put this code (below) for buzzer, there will be error.

C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/Tone.cpp:536: multiple definition of `__vector_7' IRremote\IRremote.cpp.o:

C:\Program Files\Arduino\libraries\IRremote/IRremote.cpp:312: first defined here collect2: error: ld returned 1 exit status

  tone(buzzer, 4000); // Send 1KHz sound signal...
  delay(500);        // ...for 1 sec
  noTone(buzzer);     // Stop sound...
  delay(500);        // ...for 1sec
2

Both the IRRemote library and the tone command use the same timer. You can't use them both together without modifying one of them to use a different timer. And that means looking at the source code for them both.

  • can I know how to solve it? – muhisma92 Aug 4 '16 at 4:56
  • I already found the solution. Thanks for your advise. :) – muhisma92 Aug 4 '16 at 5:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.