Hi everyone, I hope you are fine. I am beginner of Arduino ide.
I want to know about Ir hex code.
I want to make a home automation project. Now want to use two button for a single load. So how to write two hex code in one single line.
Like this code
//case 0x80BF49B6; 0x80HK49B0: relayOnOff(1); break;\
I knwo Possible to write individual line individual code. But i want write in single line two hex code.
Not sure what you mean but it is considered bad coding practice to put more than one C statement per line. I think the following will do what you want:
case 0x80BF49B6:
case 0x80BF49B0:
relayOnOff(1);
break;
I noted that 0x80HK49B0 is not a valid hex number so I took a guess at what it should be.
1 Like
If you are using a switch/case statement, just put each value on a single case statement
case 0x80BF49B6:
case 0x80HK49B0:
relayOnOff(1);
break;
1 Like
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.