title: What is the cause of the errors "'timer0_pin_port'" and "'_vector_13'"?
body: <pre><code>#include "IRremote.h"
  
  int receiver = 11;
  
  IRrecv irReceiver(receiver);
  decode_results results;
  
  void setup() {
    // put your setup code here, to run once:
  pinMode(buttonPinA, INPUT_PULLUP);
  pinMode(buttonPinB, INPUT_PULLUP);
  pinMode(buttonPinC, INPUT_PULLUP);
  pinMode(buttonPinD, INPUT_PULLUP);
  irReceiver.enableIRIn();
  }
  </code></pre>
  
  <p>The error message is:</p>
  
  <blockquote>
    <p><strong>Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':</strong></p>
    
    <p>(.text+0x0): <strong>multiple definition of `__vector_13'</strong></p>
    
    <p>libraries\IRremote\IRremote.cpp.o (symbol from plugin):(.text+0x0):
    first defined here</p>
    
    <p>c:/program files
    (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe:
    Disabling relaxation: it will not work with multiple definitions</p>
    
    <p>collect2.exe: error: ld returned 1 exit status</p>
    
    <p><strong>exit status 1</strong> Error compiling for board Arduino/Genuino Mega or Mega
    2560.</p>
  </blockquote>
  
  <p>I have recently discovered that "tone" and "IRremote" commands use timer2 from <a href="https://forum.arduino.cc/index.php?topic=120955.0" rel="nofollow noreferrer">here</a>. I am unaware of what timer2 really is and how to change it.</p>