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....
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?