Basic IR Sensor Reading Using IRremote.h lib for Arduino 1.0

As a total newbie and having bought this kit from eBay with IR remote and sensor:

http://www.ebay.co.uk/itm/270673601215?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I spent a bit of time working out how to wire up the IR reciever and get the IRremote lib to work with Arduino 1.0. As there's no Example on the site, thought I'd put my code and wiring info here for prosperity. I hope it's of help to others.

/* IR SENSOR READER PRINTS HEX TO SERIAL
SEE SETUP DIAGRAM https://lh3.googleusercontent.com/_c7i7thfRFZ4/TWYQBVvPuSI/AAAAAAAAAEA/s3mklBlFaT8/s800/decodew.jpg
 ___
|( )|  PIN 1 = SIGNAL TO ARDUINO PWM PIN 11
|___|  PIN 2 = GND
| | |  PIN 3 = 3V3
| | |
1 2 3
Arduino 1.0 IRremote lib at http://www.arcfn.com/2010/11/irremote-library-now-runs-on-teensy.html
(requires "#include <WProgram.h>" changing to "#include <Arduino.h>" in IRremoteInt.h)
Sample code at http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
*/

#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
  }
}

You helped me a lot, especially the info on using the IRremote library in Arduino 1.0.
Thanks!!

As there's no Example on the site

Last I checked, there were on the order of 42 bazillion web sites, not just THE site.

Ken Shirriff developed the IR library:

and there IS code and wiring diagrams on that site.

HI
I have confusion regards IR Transmitter and receiver
Ian using common IR LED and 3 pin IR receiver
I want to test IR LED On 1st ARDUINO UNO as a TRANSMITTER and 2nd on another ARDUINO as a RECEIVER
when i bring IR LED in front of receiver on ARDUINO SERIAL PRINT 1 and when replace IRLED form then no any value print
please any help i am so confused

waseem_Bari:
I have confusion regards IR Transmitter and receiver

Please start a new thread with your question. If you really want to make an IR Serial device, this it not related to the IRremote library.