How to Decode IR Remote Control Signals using Arduino at 56Khz

Hello Arduino fans, based on the following code example. Does the IRRemote library automatically detects if my IR receiver is a 38Khz or 56Khz device?. I know when sending you can specify frequency but not on receive.

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

No.

The carrier frequency is decoded by a tuned detector device . eg Vishay do some good ones.

Allan

Maybe you should have kept all your remote control questions in one thread, so you don't have to explain everything to the readers again.

The 3-pin receiver takes care of demodulating (removing the 56kHz carrier) the remote control data.
Leo..

Sorry for starting a new thread. But yet to understand the IRLibrary. My previous thread was about undesrstanding IR led transmitter frequency. Now my question is about an 56khz IR receiver and how does the IRlibary knows it is a 56khz receiver as opposed to a 36khz receiver. Again sorry for starting a new thread and will post all future remote control questions in this thread.

opale7000:
Now my question is about an 56khz IR receiver and how does the IRlibary knows it is a 56khz receiver as opposed to a 36khz receiver.

As said, the 3-pin receiver (TSOPxxxx) decodes (removes) that 36/38/56kHz carrier signal.
What comes out of the receiver is an on/off pulse train.
See the image in post#22 here Infrared LED frequencies - Project Guidance - Arduino Forum
The thick narrow lines represent the carrier. Just a few are drawn for clarity,
but there could be 50 in a single block.

The Arduino can decode the actual command from that pulse train,
and/or modulate/resend the code on the same or on a different carrier frequency.

So that 36/38/56kHz carrier frequency is only present in the IR transmit part (of the code), not in the receive part.
Leo..

how does the IRlibary knows it is a 56khz receiver as opposed to a 36khz receiver.

See reply #1.

Cool. Got it now.