Arduino Pronto Hex Sender is Sending Inconsistently (Solved)

I've finally managed to send a signal, but only when I send twice in a row. This causes a repeat code to automatically tack itself on, so the result is 4 signals sent at once each time I send. That isn't exactly ideal, but better than it was when I couldn't send at all.

I've contacted probono, the programmer behind IRDB and Pronto Hex Sender. He has been trying to help me, but this will take some time to resolve.

Arduino-Infrared-Pronto has a sketch called SendProntoHexWithoutLibrarySerial.ino which I've uploaded to my Arduino Uno, but can only get a response when I send the following signal twice in a row. This is for TV volume up:

SEND 0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 05F7 015B 0057 0016 0E6C

That causes a SENT response in the serial monitor , and my TV responds accordingly. The Hex is for the following device:

Protocol = NEC1, Device = 4, Function = 2

IrScrutinizer lets me send the signal without any issues, but Hex Sender won't.

I'm using a Android 1.6.6 on my Sparkfun Redboard. My IR transmitter is connected to Pin 9 and GND.

Could someone please help me determine why I can't send a controlled signal consistently?

Have you been able to confirm that its physically transmitting if you only send once? It may be that you are not sending the right "end of line" character so it waits until the buffer is full enough.

(You can sometime see IR light if you look at it via a camera view-finder)

Thank you for your response. It certainly helped me to come to my final conclusion in resolving the issue.

As it turns out, the HEX provided by IRDB.tk for my NEC device in this case was in fact somehow either incomplete or possibly just an incorrect HEX. IrScrutinizer produced the same HEX, unfortunately. As you say, I beleive it's boiling down to a buffer or perhaps an "end of line" issue, and may in fact be a simple error in the HEX. I might never figure that out.

What I now know is that the most accurate Pronto Hex one can hope to find is actually to be found in AnalysIR. The HEX for the NEC device which was provided by AnalysIR works perfectly. I don't need to send the command twice and things seem to respond accordingly.

RCMM, Sony, Sharp, and NEC have all been tested by me now. The results have so far shown that Pronto Hex Sender is the way to go when it comes to sending HEX. AnalysIR is the best source for decoding, and the exported Pronto Hex codes from it simply just works with Pronto Hex Sender. What you end up with is a Arduino compatible library that will let you send out just about any protocol you could hope for with a simple command like the following:

SEND 0000 006D 0000 0024 015D 00AC 0017 0014 0017 0014 0017 0040 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0040 0017 0040 0017 0014 0017 0040 0017 0040 0017 0040 0017 0040 0017 0040 0017 0014 0017 0040 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0040 0017 0014 0017 0040 0017 0040 0017 0040 0018 0040 0017 0040 0017 0040 0017 0600 015D 0055 0017 040E

That turned out to be the correct version of the code I mention in the previous post.

I look forward to continuing further testing in order to produce a Newb Guide 2.0 to supersede my current Newb Guide to Universal IR

AnalysIR, IrScrutinizer, and Pronto Hex are all discussed in greater detail in the "Progress Updates" section of my Newb Guide.

Many thanks to you, probono of IRDB, and Jambel of Jubito.