I’m playing with the IRremote library, and I would like to be able to dynamically send IR codes using their HEX code, but the number of bits in the hex code are not always the same, and the number of bits is a required argument in the send commands.
SO, for example, when I send the code 0x366932, I need to be able to send it along with the number of bits in the code (24 in this case).
So I need something like this:
unsigned long num1 = 0x366932; unsigned long num2 = 0xA23D22DD; irsend.send(num1, numOfBits(num1)); // 0x366932, 24 irsend.send(num2, numOfBits(num2)); // 0xA23D22DD, 32
Is this possible?