cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

Multiple definition when using TONE #32

Closed scargill closed 6 years ago

scargill commented 6 years ago

In a simple project which uses the TONE library (I'm using a NANO) I tried to compile in the IR receiver software and..

Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':

(.text+0x0): multiple definition of `__vector_7'

libraries\IRLibRecv\IRLibRecv.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino Nano.

cyborg5 commented 6 years ago

This is a conflict because most libraries use hardware timers. Try using the PCI receiver instead of the 50 µs interrupt receiver. Or determine which hardware timers are being used by the TONE library and change the default timers in IRLib2. You can find details in the documentation.

scargill commented 6 years ago

Trying PCI

Note - Word manual - mistakes.... My - sometimes my.... and screen 7 - dumpResultso() should be dumpResults()

scargill commented 6 years ago

Yup - PCI works. Ta.

sb43201 commented 6 years ago

I'm still getting the same error using IRrecvPCI myReceiver(RECV_PIN); Could you show how exactly it should be done? Or how to change timer in IRLib2? I can't find the line that control the timers. Thanks!