Pages: [1]   Go Down
Author Topic: Library  (Read 887 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hallo.
How can i the IRremote.h file put in the Arduino-library so i can use  this program?
Thanks,
            Jack.
=========================================================================================
#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
  }
}
=====================================================================================
Logged

Portland, OR
Offline Offline
Sr. Member
****
Karma: 7
Posts: 260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, USA
Offline Offline
Sr. Member
****
Karma: 7
Posts: 499
Sometimes I just can't help myself.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


Regards,

Dave
« Last Edit: February 03, 2011, 10:27:58 am by davekw7x » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: