KIR Infrared Tx.ino

From AnalysIR WiKi
Revision as of 10:44, 10 December 2019 by AnalysIR (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

> KontroLIR Home > back

This file contains functions related to sendin IR signals either directly or with IRremote or a mix of both.

  • KIR_sendRAW_Flash - supports sending RAW IR signals from FLASH. Refer to file KIR_RAW_Signals for the storage format and the examples used in Mode5. We also make use of KIR_sigTime to keep track of the elapsed time of each mark/space for improved performance.
  • KIR_sendRC5 - here we extend the IRremote function sendRC5 to manage the toggle bit of the RC5 signal using toggleFlag.
  • KIR_sendRC6 - here we extend the IRremote function sendRC6 to manage the toggle bit of the RC6 signal using toggleFlag.
  • KIR_sendMSRC6 - Here we implement full support for sending Microsoft MCE RC6 signals. This function shows how to implement a full protocol not supported by IRremote and making use of our approach with KIR_sigTime for more accurate/better performance. You may also note that we only pass an 8 bit value to this function, instead of 36 bits. This is because MSRC6 36 bit signals can be created from a unique 8 bit value and we build the full 36 bit value from that 8 bits within the function. This results in Flash and SRAM savings elsewhere in the firmware (using 8 bits instead of 36+ bits per defined signal).
  • KIR_sendNEC - here we use the IRremote function sendNEC to send the NEC signal. You could of course just use the IRremote function directly in the code. As most NEC signals are 32 bits, we avoid passing the bit count values with each signal defined and thus save Flash and SRAM elsewhere in the firmware. However, there are many signals used that are variants of NEC and you could customise this function for your own variants.
  • KIR_sendSamsung - Here we use the IRremote function to send the Samsung signal, but only pass 8 bits instead of 32. This results in savings of Flash and SRAM elsewhere in the firmware where the signals are defined. (8 bits vs 32 bits). This is made possible by the nature of this particular Samsung device & may need to be adjusted for other Samsung devices.
  • KIR_mark - This is an improved mark function, which makes use of KIR_sigTime to ensure there are no extra delays introduced into the signal due to code execution time or Arduino timer granularity etc. Note the carrier is left ON on exit and needs to be turned off with a space at the end of the signal.
  • KIR_space - This is an improved space function, which makes use of KIR_sigTime to ensure there are no extra delays introduced into the signal due to code execution time or Arduino timer granularity etc.



> KontroLIR Home > back