An odd occurrence w...
 
Notifications
Clear all

An odd occurrence with the IRRemote library.

3 Posts
2 Users
0 Likes
1,080 Views
Robo_Blue
(@robo_blue)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

Hello,

I've got a remote that I'm trying to emulate. Specifically one button. When I did the detect code I received the hex value 0x807fb874 with a NEC manufacture code.
When I try to send that value through an ir led, I keep reading the value 0x4DA41BC3. I can't figure out the relationship of these two values. I did some digging and it got real deep real quick, but I found some code on Ken Sherriffs blog about hash decoding. Don't know what the hell that means, but when I run that code and check the remote the serial spits out a "real" code, which is the one I got originally, and a "hash" code, which is the weird value that my ir led keeps sending.
So how do I get the ir led to send the "real" value?
Thank you for any help!




#include <IRremote.h>
const int switchPin = 7;

int buttonState = 1;

IRsend irsend;

void setup()
{

  pinMode(switchPin, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  buttonState = digitalRead(switchPin);
  if (buttonState == LOW) {
    delay(100);
    irsend.sendNEC(0x807fb874, 32); // TV power code
    Serial.print("sent --  ");
    Serial.println(0x807fb874, BIN);
  }
  delay(300);
}

I've never understood this joke. But then, I've never been to Earth. -American Astronaut


   
Quote
Topic Tags
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

You might try the send raw example and also confirm that the frequency is right. Probably 38 khz.

 

I hope this helps. Also, how is it wired?


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

So, I just went through a project were I came upon a similar issue. My Pioneer remote would show up as NEC on the IRRemote receive demo and a few unknown codes after. It was acting kinda odd and it did not line up with the code that the manufacture stated. I used the dump file and it told me to use the V2 version. It gave me a much longer code and identified it as Pioneer protocol.  So I pulled up the Pioneer.h file and found that it was actually a 64 bit code and had notes not to just repeat the NEC code even though that is the format. I also found a function to and a small explanation that would convert the code that I needed to send. It was because it was repeating the code and had to do some math to make it work. I would suggest using the V2 demo and see if you get a better identification. Then look into the protocols file. This might clear it all up.

 

I was using the ESP8266 fork but I would assume it is the same, though that fork does have a V3 of the dump demo.

 

I hope this sheds some light on the issue.


   
ReplyQuote