Go Down

Topic: Library (Read 1 time) previous topic - next topic


How can i the IRremote.h file put in the Arduino-library so i can use  this program?
#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
  irrecv.enableIRIn(); // Start the receiver

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value


you have the "IRemote.h" and "IRemote.cpp" files already, right?
just copy them to the arduino libraries folder as follows:
Make an "IRemote" directory inside of the "libraries" sub-directory of your sketchbook directory.
Copy IRemote.h and IRemote.cpp files into that directory.
Open Arduino.
Go to the Sketch >> Import Library menu, you should see IRemote inside, select it. The library will be compiled.


Hallo giantsfan3.
Thanks for the reply.
I have the "IRemote.h" and a "IRemoteInt.h" but no "IRemote.cpp"file.
Can i make this "IRemote.cpp" file with a C++ program and what is in this file?
Can i copy the "IRemote.h" or my RC5 program in this new file?


Feb 03, 2011, 04:18 pm Last Edit: Feb 03, 2011, 04:27 pm by davekw7x Reason: 1
Here's the drill, starting from scratch:

  • Download IRremote.zip from Ken Sharriff's blog web site.

  • Put IRremote.zip in the libraries subdirectory of your sketchbook directory and unzip it.  This creates the directories that hold the library files and the examples of the IRremote library.

  • Start Arduino.

  • Look at the examples in the IRremote library.  Compile them. See how it goes.

  • When you write your own sketch, use the Sketch->Import Library menu and select IRremote to let your sketch use the IRremote functions.  Note that, actually, there are two library headers that are #included.




Hi davekw7x.
Thanks for your answer.
It seems to work.
Best regards,

Go Up