0

IRReceiver library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

IRReceiver library

by voter on Sat Jan 30, 2021 6:56 pm

Hi, I was hoping to get some help using the IRReceiver library -- I see in the repository that it has support for some nRF52840 boards, but when I try and compile it using the Arduino IDE for the CLUE board it complains that it is incompatible. Here's the error I get, which seems to be complaining about incorrect timer register names:

Code: Select all | TOGGLE FULL SIZE
WARNING: library IRremote claims to run on avr, megaavr, samd, esp32, mbed architecture(s) and may be incompatible with your current board which runs on nrf52 architecture(s).
In file included from C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteInt.h:31,
                 from C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/IRremote.h:28,
                 from C:\Users\Benvo\OneDrive\Documents\Arduino\irrecv_clue\irrecv_clue.ino:2:
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h: In function 'void timerConfigForSend(uint16_t)':
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:538:5: error: 'TCCR1A' was not declared in this scope
  538 |     TCCR1A = _BV(WGM11); // PWM, Phase Correct, Top is ICR1
      |     ^~~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:538:18: error: 'WGM11' was not declared in this scope
  538 |     TCCR1A = _BV(WGM11); // PWM, Phase Correct, Top is ICR1
      |                  ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:538:14: error: '_BV' was not declared in this scope
  538 |     TCCR1A = _BV(WGM11); // PWM, Phase Correct, Top is ICR1
      |              ^~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:539:5: error: 'TCCR1B' was not declared in this scope
  539 |     TCCR1B = _BV(WGM13) | _BV(CS10); // CS10 -> no prescaling
      |     ^~~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:539:18: error: 'WGM13' was not declared in this scope
  539 |     TCCR1B = _BV(WGM13) | _BV(CS10); // CS10 -> no prescaling
      |                  ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:539:31: error: 'CS10' was not declared in this scope
  539 |     TCCR1B = _BV(WGM13) | _BV(CS10); // CS10 -> no prescaling
      |                               ^~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:540:5: error: 'ICR1' was not declared in this scope; did you mean 'IR1'?
  540 |     ICR1 = pwmval;
      |     ^~~~
      |     IR1
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:541:5: error: 'OCR1A' was not declared in this scope
  541 |     OCR1A = pwmval * IR_SEND_DUTY_CYCLE / 100;
      |     ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:542:5: error: 'TCNT1' was not declared in this scope
  542 |     TCNT1 = 0; // not really required, since we have an 8 bit counter, but makes the signal more reproducible
      |     ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h: In function 'void timerConfigForReceive()':
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:546:5: error: 'TCCR1A' was not declared in this scope
  546 |     TCCR1A = 0;
      |     ^~~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:547:5: error: 'TCCR1B' was not declared in this scope
  547 |     TCCR1B = _BV(WGM12) | _BV(CS10);
      |     ^~~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:547:18: error: 'WGM12' was not declared in this scope
  547 |     TCCR1B = _BV(WGM12) | _BV(CS10);
      |                  ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:547:14: error: '_BV' was not declared in this scope
  547 |     TCCR1B = _BV(WGM12) | _BV(CS10);
      |              ^~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:547:31: error: 'CS10' was not declared in this scope
  547 |     TCCR1B = _BV(WGM12) | _BV(CS10);
      |                               ^~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:548:5: error: 'OCR1A' was not declared in this scope
  548 |     OCR1A = SYSCLOCK * MICROS_PER_TICK / 1000000;
      |     ^~~~~
C:\Users\Benvo\OneDrive\Documents\Arduino\libraries\IRremote\src/private/IRremoteBoardDefs.h:549:5: error: 'TCNT1' was not declared in this scope
  549 |     TCNT1 = 0;
      |     ^~~~~


Is there anything I can do to get this working on the Clue? I just want to be able to send a Sony power-on signal.

voter
 
Posts: 1
Joined: Sat Apr 28, 2018 8:02 pm

Please be positive and constructive with your questions and comments.