Error with IRRemote

Hello :). I bought one irremote. I tried to test with Arduino uno example IRRemote code.
The code:

#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}
void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}

Before.....It was another error in IRRemoteInt.h:

[There were some more lines, but I can't post more than 9500chars]
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp:400: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeSony(decode_results*)':
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp:433: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp:443: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeRC5(decode_results*)':
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp:518: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Documents and Settings\dominik\Desktop\arduino-1.0\libraries\IRremote\IRremote.cpp:529: error: 'volatile struct irparams_t' has no member named 'rawlen'

But I fixed it:

Note for Arduino 1.0
I haven't had time to update the library yet, but several helpful people have told me that to use the library with Arduino 1.0, you need to change
#include <WProgram.h>
to
#include <Arduino.h>
in IRRemoteInt.h

I found this fix on http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
but now.....I have another error.... :frowning:

avr-gcc: IR.cpp.o: No such file or directory
avr-gcc: IRremote\IRremote.cpp.o: No such file or directory

Where is the error? Is it in the example code for IRRemote or in IRRemote.h or IRRemoteInt.h?

Where is the error?

You ignored all the compiler output. The compiler failed to compile the code, so the linker can not find the appropriate .o files.

You must fix all the compiler errors before you worry about linker errors.

Lol :smiley: I tried to upload it 17-times, and now it's working :smiley:

I have the same problem ! :frowning:

Can you help me please for a good code with no errors !

Jihadabdullah1991:
I have the same problem ! :frowning:

Can you help me please for a good code with no errors !

The IRremote library's examples are "good code with no errors".

I downloaded the library to my new laptop from github just 2-3 days ago and installed it. Every example (see screenshot) compiles, as does code of my own using that library and which I wrote about 2 years ago on old laptop.

So you'll need to be very specific about what your exact problem is.....

edit....the issue of Wprogram.h vs Arduino.h has gone away with a few lines of code in the library now, which detects the ide and uses the correct header.

#if defined(ARDUINO) && ARDUINO >= 100
#include <Arduino.h>
#else
#include <WProgram.h>
#endif

irremote.PNG