Pages: [1]   Go Down
Author Topic: Error with IRRemote  (Read 3118 times)
0 Members and 1 Guest are viewing this topic.
Localhost 127.0.0.1, World Wide Web
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello smiley. I bought one irremote. I tried to test with Arduino uno example IRRemote code.
The code:
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:
Code:
[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:
Code:
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.... smiley-sad
Code:
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?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49074
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Localhost 127.0.0.1, World Wide Web
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: