Arduino Nano with different ir decode value for same button

Here is code i'm using

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume();
  }
}

here is it's result for same button

B1FB9B0B
D3769734
5520911A
D25D5BAE
12C3947A
D3C9DD38

and the question is ?

1 Like

so how can i work with these different random code to use ir remote with relays

Hello
Well, I guess using a SWITCH/CASE instruction could help.

Probably time to fully describe the device you are using.
Paul

arduino nano with tsop 98138 with generic ir remote control oh general music system ir remote

Hi,

You have to use IR receiver IC with metalic case. In my case I have used TSOP1838 IR receiver (with metallic casing)

After that, I have not faced any issues. You can also refer to following article.

thanks man problem is solved with TSOP1838 IR receiver (with metallic casing)

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