Hi there, I am trying to figure out how to convert online posted Infrared Remote signals into a Hex address to be used in the IRRemote library.
Example: IrSender.sendNEC(0xBF00, 0xD, 0);// Address, Command, Repeats
I have learnt about Hexadecimals, conversion into binary/decimal and have also familiarised myself with the docs for IRScrutinizer. and the IRRemote Library
The website I am using for the remote button codes gives me parametric values (NECx2 D:7 S:7 F:1) which i can generate into other formats in the Iscrutinizer software . However I am unsure how to make them fit the format for IRRemote 4.1.2, as exampled above.
.
My Issue is the IRRemote docs says that the 'D' and 'S' values will be the upper and lower bytes of the address but I am unsure what this means? Does that mean I make the address decimal 77 meaning in my arduino code the hex is 0x4D or maybe 0x004D? As it does not seem to work?
Quote from the docs:
The codes found in the irdb database specify a device, a subdevice and a function. Most of the times, device and subdevice can be taken as upper and lower byte of the address parameter and function is the command parameter for the new structured functions with address, command and repeat-count parameters like e.g. IrSender.sendNEC((device << 8) | subdevice, 0x19, 2).
Any help will be greatly appreciated! I do also acknowledge it may not even be the correct remote code for my TV, but I would like to understand these terms better anyway, thank you!
It does help, however I am wondering if you could confirm that it works the opposite way as well? As I am trying to turn Decimal upper byte 7 and lower byte 7 into a suitable IR Remote address Hex value?
Am I correct in assuming that would make 0x004D? as I guessed you would join them into '77' which becomes hex '4D'? Or would it mean literally using 2 bytes of 7: 0111 and 0111 to make 0x77?
Awsome thank you so much for the reply and clarification!
That has worked now on my TV using 0x0707 I didnt realise you needed to do 0x07 for the conversion. But I am glad I was on the right track and I really appreciate your help with it, thank you.
Hi no I had not read the explination on the NEC protocol, thanks for the link.
I see where it mentions an 'eight-bit address', that makes sense meaning each upper/lower would be 4 bits.
I guess I was not too sure how to convert '7-7' into 4 bits each. I was trying to use this Hex/Decimal calculator to convert my figures but it only put out 7 as 0x7 instead of 0x07. And when I done '01110111' it gave me '0x77' too.
Edit: Thanks for the extra link, I will have to have a read of that one also!
Hello
This post has absolutely nothing to do with this thread, but you, UKHeliBob , said, that you would not like to have PM and that you prefer to answer directly in the forum.
Unfortunately the thread I would like to ask you a question is already closed.
If I open up a new thread - will you read it ?
Many thanks - and sorry for this interruption.