"'TIMER_ENABLE_PWM' was not declared in this scope"

ShaunLovell
Posts: 15
Joined: Fri Jan 10, 2020 11:36 pm

Re: "'TIMER_ENABLE_PWM' was not declared in this scope"

Post by ShaunLovell »

I have success now with version 2.5.0. I had mistakenly made this edit:
/*********************
* ARDUINO Boards
*********************/
// Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, Nano, etc
// ATmega48, ATmega88, ATmega168, ATmega328
#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) // old default clause
# if !defined(IR_USE_TIMER1) && !defined(IR_USE_TIMER2)
#define IR_USE_TIMER1 // tx = pin 9
//#define IR_USE_TIMER2 // tx = pin 3
# endif
on 2.5.0 instead of this edit:
#else
// Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, Nano, etc
// ATmega48, ATmega88, ATmega168, ATmega328
#define IR_USE_TIMER1 // tx = pin 9
#error Board could not be identified from pre-processor symbols. Please extend IRremoteBoardDefs.h.
#endif
(un-commenting IR_USE_TIMER1)
as I saw in a post of yours that I has missed somehow. HOWEVER, it only worked after I also commented out the #error statement, making it
#else
// Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, Nano, etc
// ATmega48, ATmega88, ATmega168, ATmega328
#define IR_USE_TIMER1 // tx = pin 9
//#error Board could not be identified from pre-processor symbols. Please extend IRremoteBoardDefs.h.
#endif
I also had to undo the first edit before it would compile.
ShaunLovell
Posts: 15
Joined: Fri Jan 10, 2020 11:36 pm

Re: "'TIMER_ENABLE_PWM' was not declared in this scope"

Post by ShaunLovell »

Would you still like me to e-mail you my files?
ShaunLovell
Posts: 15
Joined: Fri Jan 10, 2020 11:36 pm

Re: "'TIMER_ENABLE_PWM' was not declared in this scope"

Post by ShaunLovell »

I've since loaded IRremote 2.6.0 and it also works, with the same modifications to IRremoteBoardDefs.h

The wiki says that for 2.8.0, the edits need to be made around lines 195/196 but that would put them in the "// Arduino mega" section, whereas the section prior to that (lines 189/190) seems to have the #ifdef statements concerning atmega328P etc. I re-loaded 2.8.0 and tried a few ideas but to no avail.

It's possible that the Kontrolir's LED doesn't blink incessantly until a button is pressed after uploading the sketch with 2.8.0 whereas is does do that with the older versions. Not sure if that's a clue. It may do it immediately after uploading but not after installing the batteries. I noticed that with the older versions, it blinks after installing the batteries but it doesn't do that when IRremote 2.8.0 is used. in any case, remember that it does seem to be sending signals. They just don't work my devices.

Is it possible to determine after a compile if "USE_TIMER1' ever got defined? I'm no expert, but I'm wondering if there's a simple syntax error in one of the #ifdef statements and the board type is not getting picked up.
Post Reply