User manual
ignore that sequence which forces the user to release and repress the button each time or you can
store the previously received code and process it whenever you see the special repeat message.
Sony Triple Messages
The technical specification for Sony protocol says that you should send each code 3 consecutive
times per keypress. IRLib takes care of sending three times for you so you don't need to do
anything special. However when receiving Sony, be aware that you're going to get three copies of
the data each time the user presses a button. If you're busy processing the first sequence you might
miss the other two so it won't matter. But you need to be aware of it in case you're counting the
number of keypresses or some other application.
RC5 and RC6 Toggle Bits
The RC5 and RC6 protocols invented by Phillips use a special toggle bit to let you know whether a
code was generated by holding down the button or whether this is an independent keypress. For
example I have a TV which uses RC5 protocol and the code for Volume Up is 0x1010. If I press and
hold that button it sends the same code repeatedly. However if I release the button and press it
again I get 0x1810. Every other keypress the single bit 0x0800 will toggle off and on. You can make
sure that you ignore this feature by masking out that particular bit. When you receive a decoded
value from this protocol you could do:
This will make sure that the toggle bit is always off. The RC6 protocol also has a title bit which
is 0x10000. Therefore to mask it out you would do:
My_Decoder.value &=0xf7ff;
My_Decoder.value &=0xfeffff;
© Adafruit Industries https://learn.adafruit.com/using-an-infrared-library Page 10 of 23