IRremote
|
Public API to the library. More...
#include "IRremoteInt.h"
#include "digitalWriteFast.h"
#include "private/IRTimer.hpp"
#include "IRFeedbackLED.hpp"
#include "LongUnion.h"
#include "IRProtocol.hpp"
#include "IRReceive.hpp"
#include "IRSend.hpp"
#include "ir_BangOlufsen.hpp"
#include "ir_BoseWave.hpp"
#include "ir_Denon.hpp"
#include "ir_JVC.hpp"
#include "ir_Kaseikyo.hpp"
#include "ir_Lego.hpp"
#include "ir_LG.hpp"
#include "ir_MagiQuest.hpp"
#include "ir_NEC.hpp"
#include "ir_RC5_RC6.hpp"
#include "ir_Samsung.hpp"
#include "ir_Sony.hpp"
#include "ir_Others.hpp"
#include "ir_Pronto.hpp"
#include <ir_DistanceWidthProtocol.hpp>
Go to the source code of this file.
Macros | |
#define | VERSION_IRREMOTE "4.0.0" |
#define | VERSION_IRREMOTE_MAJOR 4 |
#define | VERSION_IRREMOTE_MINOR 0 |
#define | VERSION_IRREMOTE_PATCH 0 |
#define | VERSION_HEX_VALUE(major, minor, patch) ((major << 16) | (minor << 8) | (patch)) |
#define | VERSION_IRREMOTE_HEX VERSION_HEX_VALUE(VERSION_IRREMOTE_MAJOR, VERSION_IRREMOTE_MINOR, VERSION_IRREMOTE_PATCH) |
#define | DECODE_DENON |
#define | DECODE_JVC |
#define | DECODE_KASEIKYO |
#define | DECODE_PANASONIC |
#define | DECODE_LG |
#define | DECODE_NEC |
#define | DECODE_SAMSUNG |
#define | DECODE_SONY |
#define | DECODE_RC5 |
#define | DECODE_RC6 |
#define | DECODE_BOSEWAVE |
#define | DECODE_LEGO_PF |
#define | DECODE_MAGIQUEST |
#define | DECODE_WHYNTER |
#define | DECODE_DISTANCE_WIDTH |
#define | DECODE_HASH |
#define | MARK_EXCESS_MICROS 20 |
MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding, to compensate for the signal forming of different IR receiver modules For Vishay TSOP*, marks tend to be too long and spaces tend to be too short. More... | |
#define | RECORD_GAP_MICROS 5000 |
Minimum gap between IR transmissions, to detect the end of a protocol. More... | |
#define | RECORD_GAP_MICROS_WARNING_THRESHOLD 15000 |
Threshold for warnings at printIRResult*() to report about changing the RECORD_GAP_MICROS value to a higher value. More... | |
#define | RECORD_GAP_TICKS (RECORD_GAP_MICROS / MICROS_PER_TICK) |
Minimum gap between IR transmissions, in MICROS_PER_TICK. More... | |
#define | INPUT_MARK 0 |
Sensor output for a mark ("flash") More... | |
#define | PULSE_CORRECTION_NANOS 600 |
Define to disable carrier PWM generation in software and use (restricted) hardware PWM. More... | |
#define | IR_SEND_DUTY_CYCLE_PERCENT 30 |
Duty cycle in percent for sent signals. More... | |
#define | MICROS_PER_TICK 50 |
microseconds per clock interrupt tick More... | |
#define | MILLIS_IN_ONE_SECOND 1000L |
#define | MICROS_IN_ONE_SECOND 1000000L |
#define | MICROS_IN_ONE_MILLI 1000L |
#define | RAWBUF 101 |
Macros for legacy compatibility. More... | |
#define | REPEAT 0xFFFFFFFF |
#define | USECPERTICK MICROS_PER_TICK |
#define | MARK_EXCESS MARK_EXCESS_MICROS |
Public API to the library.
This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
MIT License
Copyright (c) 2015-2022 Ken Shirriff http://www.righto.com, Rafi Khan, Armin Joachimsmeyer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For Ken Shiriffs original blog entry, see http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html Initially influenced by: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556 and http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
Definition in file IRremote.hpp.
#define DECODE_BOSEWAVE |
Definition at line 119 of file IRremote.hpp.
#define DECODE_DENON |
Definition at line 107 of file IRremote.hpp.
#define DECODE_DISTANCE_WIDTH |
Definition at line 126 of file IRremote.hpp.
#define DECODE_HASH |
Definition at line 127 of file IRremote.hpp.
#define DECODE_JVC |
Definition at line 108 of file IRremote.hpp.
#define DECODE_KASEIKYO |
Definition at line 109 of file IRremote.hpp.
#define DECODE_LEGO_PF |
Definition at line 120 of file IRremote.hpp.
#define DECODE_LG |
Definition at line 111 of file IRremote.hpp.
#define DECODE_MAGIQUEST |
Definition at line 121 of file IRremote.hpp.
#define DECODE_NEC |
Definition at line 112 of file IRremote.hpp.
#define DECODE_PANASONIC |
Definition at line 110 of file IRremote.hpp.
#define DECODE_RC5 |
Definition at line 115 of file IRremote.hpp.
#define DECODE_RC6 |
Definition at line 116 of file IRremote.hpp.
#define DECODE_SAMSUNG |
Definition at line 113 of file IRremote.hpp.
#define DECODE_SONY |
Definition at line 114 of file IRremote.hpp.
#define DECODE_WHYNTER |
Definition at line 122 of file IRremote.hpp.
#define INPUT_MARK 0 |
Sensor output for a mark ("flash")
Definition at line 193 of file IRremote.hpp.
#define IR_SEND_DUTY_CYCLE_PERCENT 30 |
Duty cycle in percent for sent signals.
Definition at line 252 of file IRremote.hpp.
#define MARK_EXCESS MARK_EXCESS_MICROS |
Definition at line 326 of file IRremote.hpp.
#define MARK_EXCESS_MICROS 20 |
MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding, to compensate for the signal forming of different IR receiver modules For Vishay TSOP*, marks tend to be too long and spaces tend to be too short.
If you set MARK_EXCESS_MICROS to approx. 50us then the TSOP4838 works best. At 100us it also worked, but not as well. Set MARK_EXCESS to 100us and the VS1838 doesn't work at all.
The right value is critical for IR codes using short pulses like Denon / Sharp / Lego
Observed values: Delta of each signal type is around 50 up to 100 and at low signals up to 200. TSOP is better, especially at low IR signal level. VS1838 Mark Excess -50 at low intensity to +50 us at high intensity TSOP31238 Mark Excess 0 to +50
Definition at line 160 of file IRremote.hpp.
#define MICROS_IN_ONE_MILLI 1000L |
Definition at line 264 of file IRremote.hpp.
#define MICROS_IN_ONE_SECOND 1000000L |
Definition at line 263 of file IRremote.hpp.
#define MICROS_PER_TICK 50 |
microseconds per clock interrupt tick
Definition at line 259 of file IRremote.hpp.
#define MILLIS_IN_ONE_SECOND 1000L |
Definition at line 262 of file IRremote.hpp.
#define PULSE_CORRECTION_NANOS 600 |
Define to disable carrier PWM generation in software and use (restricted) hardware PWM.
Define to use no carrier PWM, just simulate an active low receiver signal. Define to use or simulate open drain output mode at send pin. Attention, active state of open drain is LOW, so connect the send LED between positive supply and send pin! This amount is subtracted from the on-time of the pulses generated for software PWM generation. It should be the time used for digitalWrite(sendPin, LOW) and the call to delayMicros() Measured value for Nano @16MHz is around 3000, for Bluepill @72MHz is around 700, for Zero 3600
Definition at line 244 of file IRremote.hpp.
#define RAWBUF 101 |
Macros for legacy compatibility.
Definition at line 323 of file IRremote.hpp.
#define RECORD_GAP_MICROS 5000 |
Minimum gap between IR transmissions, to detect the end of a protocol.
Must be greater than any space of a protocol e.g. the NEC header space of 4500 us. Must be smaller than any gap between a command and a repeat; e.g. the retransmission gap for Sony is around 15 ms for Sony20 protocol. Keep in mind, that this is the delay between the end of the received command and the start of decoding.
Definition at line 171 of file IRremote.hpp.
#define RECORD_GAP_MICROS_WARNING_THRESHOLD 15000 |
Threshold for warnings at printIRResult*() to report about changing the RECORD_GAP_MICROS value to a higher value.
Definition at line 178 of file IRremote.hpp.
#define RECORD_GAP_TICKS (RECORD_GAP_MICROS / MICROS_PER_TICK) |
Minimum gap between IR transmissions, in MICROS_PER_TICK.
Definition at line 182 of file IRremote.hpp.
#define REPEAT 0xFFFFFFFF |
Definition at line 324 of file IRremote.hpp.
#define USECPERTICK MICROS_PER_TICK |
Definition at line 325 of file IRremote.hpp.
#define VERSION_HEX_VALUE | ( | major, | |
minor, | |||
patch | |||
) | ((major << 16) | (minor << 8) | (patch)) |
Definition at line 78 of file IRremote.hpp.
#define VERSION_IRREMOTE "4.0.0" |
Definition at line 69 of file IRremote.hpp.
#define VERSION_IRREMOTE_HEX VERSION_HEX_VALUE(VERSION_IRREMOTE_MAJOR, VERSION_IRREMOTE_MINOR, VERSION_IRREMOTE_PATCH) |
Definition at line 79 of file IRremote.hpp.
#define VERSION_IRREMOTE_MAJOR 4 |
Definition at line 70 of file IRremote.hpp.
#define VERSION_IRREMOTE_MINOR 0 |
Definition at line 71 of file IRremote.hpp.
#define VERSION_IRREMOTE_PATCH 0 |
Definition at line 72 of file IRremote.hpp.