How to decode IR Sender values

Hi guys, I'm trying to create an IR sender using Arduino, I'm able to send and receive data but the data or commands that I'm receiving make no sense to me, even when I send the same command in the loop, I get different values on my receiver on every iteration.

I use the ReceiveDump program to get a TV Remote info, but not sure how to use that data on the sender to simulate the command.

For example, I get this data

Protocol=SAMSUNG Address=0x707 Command=0x2 Raw-Data=0xFD020707 32 bits LSB first

And using this in the loop gives me different values each time and any of the values match the value that I'm expecting for POWER that is 0xFD020707

uint16_t address = 0x707;
uint16_t command = 0x2;

void loop() {
    IrSender.sendNEC(address, command,  0, false);
    delay(DELAY_AFTER_LOOP); 

    IrSender.sendNECRaw(0xFD020707);
    delay(DELAY_AFTER_LOOP); 

    IrSender.sendSAMSUNG(0xFD020707, 32);
    delay(DELAY_AFTER_LOOP); 
}

I tested most of the sender example methods are the result is similar, I assume that is something that I missing in how to use the library, I read the REAMDE in Github but it was not really helpful, at least for me.

Arduino-IRremote

Resuming, my questions are how should I use the ReceiveDump data, and why do the send values change on each iteration if I'm sending the same data?

Regards!

I have found that in a simple IRremote project that the "code received" is right about 1 in 4 tries (yes, 75% failure rate). Other users have said I must have something wrong because their projects approach 100% success, so I tried another IR receiver, and got my same results (75% fail rate with tens of remotes, hundreds of buttons pressed). I "solved" my problem by validating the received codes first, then acted on the valid code, rather than trying to find if the received code matches one of the conditional statements. As all commercial advertising says, "Results may vary," which is what I found to be true.

I found this link as one of the best sites regarding IR technology:

https://www.mikrocontroller.net/articles/IRMP_-_english#top

IRMP is all about receiving, from there you also get a link to IRSND for transmission...

Thanks for the response, I tried, and works pretty well.

I use the IRMP library now and no problem with the codes, I was able to resend codes expected by my TV using the control that comes in the kit that I get.

Glad I could help with this link ... and of course a lot of thanks to the guy who provided the excellent source on www.mikrocontroller.net regarding IR codes ... :wink:

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