我在這裡下載Library https://github.com/coopermaa/Arduino-IRremote
上載程式時會出現下列訊息:
core.a(Tone.cpp.o): In function `__vector_7':
D:\arduino-1.0.5\hardware\arduino\cores\arduino/Tone.cpp:535: multiple definition of `__vector_7'
IRremote\IRremote.cpp.o:\arduino-1.0.5\libraries\IRremote/IRremote.cpp:311: first defined here
我大概知道是 IRremote 和 tone() 都使用 Timer 2, 所以才會衝突, 請問該如何解決。
源碼如下: - #include <IRremote.h>
- void setup()
- {
- tone(11, 1140, 200);
- }
- void loop()
- {
- }
复制代码 |