IR - Transmit Result differs from Received Result

I am using a Send and a matching Receive IR Modules using 2 Arduino Uno. I am trying to replicate a Remote using the Arduino. The Remote generates the following on the monitor

“Protocol=NEC Address=0x80 Command=0x4 Raw-Data=0xFB047F80 32 bits LSB first Gap=3276750us Duration=67500us”

But the Receive Module generates this

“Protocol=NEC Address=0xDF Command=0xFE Raw-Data=0x1FE20DF 32 bits LSB first Gap=3276750us Duration=67850us”

This my send code

#include <IRremote.h>
IRsend irsend =2;
void setup() {
  Serial.begin(9600);
  Serial.println("IR Transmitter Ready");
}
void loop() {
  // Send a sample NEC code (e.g., 0xFB047F80)
  irsend.sendNEC(0xFB047F80, 32); // 32-bit NEC code
  Serial.println("IR Signal Sent");
  delay(2000); // Wait 2 seconds before sending again
}

This my Receive code

#include "IRremote.hpp"
#define IR_RECEIVE_PIN 2
void setup() {
  Serial.begin(9600);
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);  
}
void loop() {
  if (IrReceiver.decode()) {
    IrReceiver.printIRResultShort(&Serial);
    IrReceiver.resume();
  }
}

Can anyone help here?

I moved your topic to an appropriate forum category @lattitude.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Got it - Sorry -

1 Like

You are using two different library versions which handle the signal differently. Update the transmitter library to 4.3 version and use the library example simplesender.ino for correct syntax.

1 Like

kmin - I changed the libraries to match and it still did not work, however I did notice in another post that they had used ‘irsend.sendNECRaw(0xxxxxxxxx, 32);’ and when I changed the send to NECRaw it worked, So thank you for your assistance in this matter as it is appreciated.

Yep, if I remember well they flipped the NEC protocol between those libraries, so you need to have both on new library and get new received signal.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.