Arduino Due... IRremote library (error compiling)

Hi,

I have been playing with Arduino for a few years now and really like it!!!

But I started to run out of memory in the UNO… I tried to optimize the crap out of the code… but if I kept going I wouldn’t have programmed myself into a corner.

So I got my hands on a Arduno Due from Freetronics (quite nice kit)… and have TONS more power and memory to fill up.

Next step for my project was to deal with IR.

Im using 1.6.5 and installed IRremote by Ken Shirriff… I can get it to compile on my UNO or Mega… but the due wont compile!!! gah.

Im just trying to run the example code to send IR (although simular issue with IR receviving too!)

/*
 * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
 * An IR LED must be connected to Arduino PWM pin 3.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */

#include <IRremote.h>

IRsend irsend;

void setup()
{
  Serial.begin(9600);
}

void loop() {
  if (Serial.read() != -1) {
    for (int i = 0; i < 3; i++) {
      irsend.sendSony(0xa90, 12); // Sony TV power code
      delay(40);
    }
  }
}

Below is the error when compiling:

In file included from C:\Users\xxx\Documents\Arduino\libraries\IRremote\IRremote.h:24:0,
                 from C:\Users\xxx\Documents\Arduino\libraries\IRremote\irISR.cpp:3:
C:\Users\xxx\Documents\Arduino\libraries\IRremote\irISR.cpp: In function 'void TIMER2_COMPA_vect()':
C:\Users\xxx\Documents\Arduino\libraries\IRremote\IRremoteInt.h:90:26: error: 'PORTB' was not declared in this scope
  #define BLINKLED_ON()  (PORTB |= B00100000)
                          ^
C:\Users\xxx\Documents\Arduino\libraries\IRremote\irISR.cpp:82:24: note: in expansion of macro 'BLINKLED_ON'
   if (irdata == MARK)  BLINKLED_ON() ;   // turn pin 13 LED on
                        ^
C:\Users\xxx\Documents\Arduino\libraries\IRremote\IRremoteInt.h:91:27: error: 'PORTB' was not declared in this scope
 # define BLINKLED_OFF()  (PORTB &= B11011111)
                           ^
C:\Users\xxx\Documents\Arduino\libraries\IRremote\irISR.cpp:83:24: note: in expansion of macro 'BLINKLED_OFF'
   else                 BLINKLED_OFF() ;  // turn pin 13 LED off
                        ^
Multiple libraries were found for "IRremote.h"
 Used: C:\Users\xxx\Documents\Arduino\libraries\IRremote
 Not used: C:\Users\xxx\Desktop\arduino-1.6.5-r2\libraries\RobotIRremote
Error compiling.

I have spent a fair amount of time trying to figure this out… and now I just need help lol.

Maybe there is a library for Due? I couldnt find anything.

Thanks in Advance
Jade

I have downloaded a few different versions of IRremote that I could find on the net and none of them worked :frowning:

Is this going to be the same issue for every library?
Basicly all I really want to do is send ir out of the arduino due.
Because I'm having the some issues with dht library as well.

If this is the case maybe this platform isn't for my project which would be quite disappointing considering the amount of time I have sunk into it. :frowning:

Is the due going to have library built? Or is the due a random off shoot of arduino line that will get little attention and then go end of life.

Eventually, the Due will probably have code written for it. You could use a Pro Mini to read sensors and have the Due read it with I2C.

you could try an approach like this:

However, you will have to adjust the timings used for the due, which would require a logic analyzer or Scope.

I know "this topic has not been posted in for at least 120 days." but I had the same trouble as original topic and asked the mighty google (this topic was the first I found) : solution I found was ... to further google search and second google answer was ...

and worked for me....