#include <IRremote.h>

#define IR_RECEIVER_PIN 3

IRrecv irrecv(IR_RECEIVER_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the IR receiver
}

void loop()
{
  if (irrecv.decode(&results))
  {
    // Print raw data
    Serial.println("Raw data:");
    for (int i = 0; i < results.rawlen; i++) {
      Serial.print(results.rawbuf[i]);
      Serial.print(" ");
    }
    Serial.println("");
    
    irrecv.resume(); // Receive the next value
  }
}