Hello,
I'm new to Arduino and wanted to learn IR remote related things. I just write below code and this code works well. But only the issue is I'm always getting same HEX code for small remote and my TV remote also provide same HEX code. Then I check with my phone's IR remote. (I have a fan that has a remote and I configure it to my phone) When I use my phone's IR remote it works well. May I know why this is happening? Anyone experience same?
#include <IRremote.h>
const int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup(){
Serial.begin(9600);
irrecv.enableIRIn();
irrecv.blink13(true);
}
void loop(){
if (irrecv.decode(&results)){
Serial.print(results.value);
Serial.print(",");
Serial.print(results.value, HEX);
Serial.println("");
irrecv.resume();
}
}
Small remote this is the output for every key.
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
4294967295,FFFFFFFF
Below is the TV remote output
Key no 1
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 2
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 3
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 4
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 5
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 6
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 7
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 8
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 9
4294967295,FFFFFFFF
1253111734,4AB0F7B6
Key no 0
4294967295,FFFFFFFF
1253111734,4AB0F7B6
My phone's IR remote. (Fan is configured)
Speed button
338831067,143226DB
338831067,143226DB
338831067,143226DB
338831067,143226DB
Timer button
3768077238,E0984BB6
3768077238,E0984BB6
3768077238,E0984BB6
3768077238,E0984BB6
Mode button
924466310,371A3C86
924466310,371A3C86
243655727,E85E42F
924466310,371A3C86
Oscillation button
3606545071,D6F782AF
970202565,39D41DC5
970202566,39D41DC6
3051317709,B5DF69CD
Power off button
2737486129,A32AB931
2737486129,A32AB931
2737486129,A32AB931
2737486129,A32AB931
Here are the photos of remotes that I used.