user24310: 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


user4143: 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.

24310: <p>I am doing code for IR sensor. My problem is when I put this code (below) for buzzer, there will be error.</p>

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

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

<pre><code>  tone(buzzer, 4000); // Send 1KHz sound signal...
  delay(500);        // ...for 1 sec
  noTone(buzzer);     // Stop sound...
  delay(500);        // ...for 1sec
</code></pre>
 4143: <p>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.</p>
