Hello,
For my two-wheeled robot I’d like to use a sonar and an IR-remote. Hence, I’d like to include two libraries, like this
#include <NewPing.h>
#include <IRremote.h>
I recieved an error:
IRremote\IRremote.cpp.o: In function __vector_7':* *C:\Arduino\arduino-1.0.1\libraries\IRremote/IRremote.cpp:311: multiple definition of
__vector_7’
Sonar\NewPing.cpp.o:C:\Arduino\arduino-1.0.1\libraries\Sonar/NewPing.cpp:214: first defined here
which is because both libraries use the same interrupt code/system/thing.
After searching the forums, I found this topic:
http://forum.arduino.cc/index.php/topic,126251.0.html
which basically explains how to modify the NewPing library. I have followed the instructions.
The problem is, and I have experienced this before, is that the Arduino IDE somehow uses an old version of the library. I could change the content of NewPing.pde to $@##@something@@ and it still wouldn’t change the behaviour.
(as a side note, this is also why my contributed libraries now look like this:
ultrasonic1
ultrasonic2
ultrasonic3
ultrasonic4
NewPing
in an attempt to bypass this problem)
What is causing this problem and how can I fix it? I think it is probably some caching isue. Thanks for any help!