#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();
}
The error message is:
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
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
collect2.exe: error: ld returned 1 exit status
exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560.
I have recently discovered that "tone" and "IRremote" commands use timer2 from here. I am unaware of what timer2 really is and how to change it.
IRremote.h
header file? – Paul