Errors in IRremote.h ...?

I've only been writing my sketch for a couple of hours. I'm trying to prepare a sketch that has both audio and IR receiving capability, and I'm getting a weird error (and this is the ONLY error given):

core.a(Tone.cpp.o): In function `__vector_7':
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Tone.cpp:535: multiple definition of `__vector_7'
IRremote\IRremote.cpp.o:C:\xxx\Arduino\libraries\IRremote/IRremote.cpp:311: first defined here

This is for a laser tag system that emulates the functionality of an older system that's falling apart. It emits and reads IR from opponents in order to identify who has been hit, and emits the audio as a part of feedback to the user.

In this case, I'm not sure that posting my code would be helpful, or if I should contact the author of the IRremote library,.. or what. The example sketches from IRremote compile fine until I add a tone() call, and then they produce precisely the same 3 lines of error.

Is there another library that has the same functionality as IRremote (e.g., being able to read, display and interpret some of the signals from infrared demodulators (such as the Vishay TSOP382xx series that I got from SparkFun)?

The IRremote library needs a timer. The tone() function needs a timer. Guess what? They use the same timer. That's what the error message is tap-dancing around trying to tell you.

Thanks, Paul, that does actually help.

Is this a hardware limitation, or can I just declare another vector in IRremote.h and have it work (keeping in mind the other libraries that I'm using)?

See this page for a modified copy of IRremote that makes it easy to change timers.
http://pjrc.com/teensy/td_libs_IRremote.html

Okay, looking through the code, that was amazingly useful and educational. :slight_smile:

So, am I to understand that these particular timers are "interrupt-based" and "hardware-related to particular pins unless the software declares them otherwise"?

(Quotes added for clarification.)

Okay, okay... I actually RTFM'd... long and very dry read, but I got a lot of the answers I was looking for, even if it took a couple of days (and being on a deadline isn't making this fun or easy, but at least I stand a chance of making it).

Thanks for the help, guys. Really, it got me really looking into this in depth.