IRremote
Receiving IR data for multiple protocols

Macros

#define FNV_PRIME_32   16777619
 used for decodeHash() More...
 
#define FNV_BASIS_32   2166136261
 used for decodeHash() More...
 

Functions

const char * getProtocolString (decode_type_t aProtocol)
 
void IRReceiveTimerInterruptHandler ()
 
bool matchTicks (uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
 Match function WITHOUT compensating for marks exceeded or spaces shortened by demodulator hardware. More...
 
bool matchTicks (uint16_t aMeasuredTicks, uint16_t aMatchValueMicros, int16_t aCompensationMicrosForTicks)
 Match function WITH compensating for marks exceeded or spaces shortened by demodulator hardware. More...
 
bool MATCH (uint16_t measured_ticks, uint16_t desired_us)
 
bool matchMark (uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
 Compensate for marks exceeded by demodulator hardware. More...
 
bool MATCH_MARK (uint16_t measured_ticks, uint16_t desired_us)
 
bool matchSpace (uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
 Compensate for spaces shortened by demodulator hardware. More...
 
bool MATCH_SPACE (uint16_t measured_ticks, uint16_t desired_us)
 
int getMarkExcessMicros ()
 Getter function for MARK_EXCESS_MICROS. More...
 
void printActiveIRProtocols (Print *aSerial)
 
 IRrecv::IRrecv ()
 Instantiate the IRrecv class. More...
 
 IRrecv::IRrecv (uint_fast8_t aReceivePin) __attribute__((deprecated("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin()
 
 IRrecv::IRrecv (uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin) __attribute__((deprecated("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin()
 Instantiate the IRrecv class. More...
 
void IRrecv::ReceiveInterruptHandler ()
 
void IRrecv::begin (uint_fast8_t aReceivePin, bool aEnableLEDFeedback=false, uint_fast8_t aFeedbackLEDPin=USE_DEFAULT_FEEDBACK_LED_PIN)
 Initializes the receive and feedback pin. More...
 
void IRrecv::setReceivePin (uint_fast8_t aReceivePinNumber)
 Sets / changes the receiver pin number. More...
 
void IRrecv::registerReceiveCompleteCallback (void(*aReceiveCompleteCallbackFunction)(void))
 Sets the function to call if a complete protocol frame has arrived. More...
 
void IRrecv::start ()
 Start the receiving process. More...
 
void IRrecv::restartTimer ()
 
void IRrecv::enableIRIn ()
 Alias for start(). More...
 
void IRrecv::restartTimer (uint32_t aMicrosecondsToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void IRrecv::restartTimerWithTicksToAdd (uint16_t aTicksToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void IRrecv::restartAfterSend ()
 Restarts receiver after send. More...
 
void IRrecv::stop ()
 Disables the timer for IR reception. More...
 
void IRrecv::stopTimer ()
 
void IRrecv::disableIRIn ()
 Alias for stop(). More...
 
void IRrecv::end ()
 Alias for stop(). More...
 
bool IRrecv::isIdle ()
 Returns status of reception. More...
 
void IRrecv::resume ()
 Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame. More...
 
void IRrecv::initDecodedIRData ()
 Is internally called by decode before calling decoders. More...
 
bool IRrecv::available ()
 Returns true if IR receiver data is available. More...
 
IRDataIRrecv::read ()
 Returns pointer to IrReceiver.decodedIRData if IR receiver data is available, else nullptr. More...
 
bool IRrecv::decode ()
 The main decode function, attempts to decode the recently receive IR signal. More...
 
void IRrecv::decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMicros, bool aIsPulseWidthProtocol, bool aMSBfirst)
 Decode pulse distance width protocols. More...
 
void IRrecv::decodeWithThresholdPulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneThresholdMicros, bool aIsPulseWidthProtocol, bool aMSBfirst)
 New threshold decoder to be activated by USE_THRESHOLD_DECODER Assumes a 0 for shorter and a 1 for longer timing. More...
 
void IRrecv::decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, bool aMSBfirst)
 Old deprecated version with 3 timing parameters instead of one and a aIsPulseWidthProtocol flag. More...
 
void IRrecv::decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aZeroMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst) __attribute__((deprecated("Please use decodePulseDistanceWidthData() with 6 parameters.")))
 
bool IRrecv::decodeStrictPulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst)
 
void IRrecv::decodePulseDistanceWidthData (PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
 Decode pulse distance protocols for PulseDistanceWidthProtocolConstants. More...
 
void IRrecv::decodePulseDistanceWidthData_P (PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
 
void IRrecv::initBiphaselevel (uint_fast8_t aRCDecodeRawbuffOffset, uint16_t aBiphaseTimeUnit)
 
uint_fast8_t IRrecv::getBiphaselevel ()
 Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer. More...
 
uint_fast8_t IRrecv::compare (uint16_t oldval, uint16_t newval)
 Compare two (tick) values for Hash decoder Use a tolerance of 20% to enable e.g. More...
 
bool IRrecv::decodeHash ()
 Decodes an arbitrary IR code to a 32-bit value. More...
 
bool IRrecv::decodeHashOld (decode_results *aResults)
 
bool IRrecv::checkHeader (PulseDistanceWidthProtocolConstants *aProtocolConstants)
 
bool IRrecv::checkHeader_P (PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM)
 
void IRrecv::checkForRepeatSpaceTicksAndSetFlag (uint16_t aMaximumRepeatSpaceTicks)
 
bool IRrecv::checkForRecordGapsMicros (Print *aSerial)
 Checks if protocol is not detected and detected space between two transmissions is smaller than known value for protocols (Sony with around 24 ms) More...
 
static void IRrecv::printActiveIRProtocols (Print *aSerial)
 

Variables

const char string_Unknown[] PROGMEM = "UNKNOWN"
 
IRrecv IrReceiver
 The receiver instance. More...
 
unsigned long sMicrosAtLastStopTimer = 0
 
uint_fast8_t sBiphaseDecodeRawbuffOffset
 
uint16_t sBiphaseCurrentTimingIntervals
 
uint_fast8_t sBiphaseUsedTimingIntervals
 
uint16_t sBiphaseTimeUnit
 
const char *const ProtocolNames []
 

Detailed Description

Macro Definition Documentation

◆ FNV_BASIS_32

#define FNV_BASIS_32   2166136261

used for decodeHash()

Definition at line 1203 of file IRReceive.hpp.

◆ FNV_PRIME_32

#define FNV_PRIME_32   16777619

used for decodeHash()

Definition at line 1202 of file IRReceive.hpp.

Function Documentation

◆ IRrecv() [1/3]

IRrecv::IRrecv ( )

Instantiate the IRrecv class.

Multiple instantiation is not supported.

Parameters
IRReceivePinArduino pin to use. No sanity check is made.

Definition at line 76 of file IRReceive.hpp.

◆ IRrecv() [2/3]

IRrecv::IRrecv ( uint_fast8_t  aReceivePin)

Definition at line 80 of file IRReceive.hpp.

◆ IRrecv() [3/3]

IRrecv::IRrecv ( uint_fast8_t  aReceivePin,
uint_fast8_t  aFeedbackLEDPin 
)

Instantiate the IRrecv class.

Multiple instantiation is not supported.

Parameters
aReceivePinArduino pin to use, where a demodulating IR receiver is connected.
aFeedbackLEDPinif 0, then take board specific FEEDBACK_LED_ON() and FEEDBACK_LED_OFF() functions

Definition at line 89 of file IRReceive.hpp.

◆ available()

bool IRrecv::available ( )

Returns true if IR receiver data is available.

Definition at line 543 of file IRReceive.hpp.

◆ begin()

void IRrecv::begin ( uint_fast8_t  aReceivePin,
bool  aEnableLEDFeedback = false,
uint_fast8_t  aFeedbackLEDPin = USE_DEFAULT_FEEDBACK_LED_PIN 
)

Initializes the receive and feedback pin.

Parameters
aReceivePinThe Arduino pin number, where a demodulating IR receiver is connected.
aEnableLEDFeedbackif true / ENABLE_LED_FEEDBACK, then let the feedback led blink on receiving IR signal
aFeedbackLEDPinif 0 / USE_DEFAULT_FEEDBACK_LED_PIN, then take board specific FEEDBACK_LED_ON() and FEEDBACK_LED_OFF() functions

Definition at line 316 of file IRReceive.hpp.

◆ checkForRecordGapsMicros()

bool IRrecv::checkForRecordGapsMicros ( Print *  aSerial)

Checks if protocol is not detected and detected space between two transmissions is smaller than known value for protocols (Sony with around 24 ms)

Returns
true, if CheckForRecordGapsMicros() has printed a message, i.e. gap < 15ms (RECORD_GAP_MICROS_WARNING_THRESHOLD)

Definition at line 1513 of file IRReceive.hpp.

◆ checkForRepeatSpaceTicksAndSetFlag()

void IRrecv::checkForRepeatSpaceTicksAndSetFlag ( uint16_t  aMaximumRepeatSpaceTicks)

Definition at line 1333 of file IRReceive.hpp.

◆ checkHeader()

bool IRrecv::checkHeader ( PulseDistanceWidthProtocolConstants aProtocolConstants)

Definition at line 1290 of file IRReceive.hpp.

◆ checkHeader_P()

bool IRrecv::checkHeader_P ( PulseDistanceWidthProtocolConstants const *  aProtocolConstantsPGM)

Definition at line 1309 of file IRReceive.hpp.

◆ compare()

uint_fast8_t IRrecv::compare ( uint16_t  oldval,
uint16_t  newval 
)

Compare two (tick) values for Hash decoder Use a tolerance of 20% to enable e.g.

500 and 600 (NEC timing) to be equal

Returns
0 if newval is shorter, 1 if newval is equal, and 2 if newval is longer

Definition at line 1209 of file IRReceive.hpp.

◆ decode()

bool IRrecv::decode ( )

The main decode function, attempts to decode the recently receive IR signal.

The set of decoders used is determined by active definitions of the DECODE_<PROTOCOL> macros. Results of decoding are stored in IrReceiver.decodedIRData.* like e.g. IrReceiver.decodedIRData.command.

Returns
false if no IR receiver data available, true if data available.

Definition at line 567 of file IRReceive.hpp.

◆ decodeHash()

bool IRrecv::decodeHash ( )

Decodes an arbitrary IR code to a 32-bit value.

Instead of decoding using a standard encoding scheme (e.g. Sony, NEC, RC5), the code is hashed to a 32-bit value.

The algorithm looks at the sequence of MARK and SPACE signals, and see if each one is shorter (0), the same length (1), or longer (2) than the previous MARK or SPACE. It hash the resulting sequence of 0's, 1's, and 2's to a 32-bit value. This will give a unique value for each different code (probably), for most code systems.

Uses FNV hash algorithm: http://isthe.com/chongo/tech/comp/fnv/#FNV-param Converts the raw code values into a 32-bit hash code. Hopefully this code is unique for each button. This isn't a "real" decoding, just an arbitrary value.

see: http://www.righto.com/2010/01/using-arbitrary-remotes-with-arduino.html

Definition at line 1236 of file IRReceive.hpp.

◆ decodeHashOld()

bool IRrecv::decodeHashOld ( decode_results aResults)

Definition at line 1261 of file IRReceive.hpp.

◆ decodePulseDistanceWidthData() [1/4]

void IRrecv::decodePulseDistanceWidthData ( PulseDistanceWidthProtocolConstants aProtocolConstants,
uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset = 3 
)

Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.

Returns
true if decoding was successful

Definition at line 1081 of file IRReceive.hpp.

◆ decodePulseDistanceWidthData() [2/4]

void IRrecv::decodePulseDistanceWidthData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint16_t  aOneMarkMicros,
uint16_t  aOneSpaceMicros,
uint16_t  aZeroMarkMicros,
bool  aMSBfirst 
)

Old deprecated version with 3 timing parameters instead of one and a aIsPulseWidthProtocol flag.

Definition at line 882 of file IRReceive.hpp.

◆ decodePulseDistanceWidthData() [3/4]

void IRrecv::decodePulseDistanceWidthData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint16_t  aOneMarkMicros,
uint16_t  aZeroMarkMicros,
uint16_t  aOneSpaceMicros,
uint16_t  aZeroSpaceMicros,
bool  aMSBfirst 
)

Definition at line 941 of file IRReceive.hpp.

◆ decodePulseDistanceWidthData() [4/4]

void IRrecv::decodePulseDistanceWidthData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint16_t  aOneMicros,
bool  aIsPulseWidthProtocol,
bool  aMSBfirst 
)

Decode pulse distance width protocols.

We only check the mark or space length of a 1 against a threshold value, otherwise we always assume a 0! using matchMark() and matchSpace(), which includes MARK_EXCESS_MICROS in comparison.

We can have the following protocol timings PULSE_DISTANCE: Pause/spaces have different length and determine the bit value, longer space is 1. Pulses/marks can be constant, like NEC. PULSE_WIDTH: Pulses/marks have different length and determine the bit value, longer mark is 1. Pause/spaces can be constant, like Sony. PULSE_DISTANCE_WIDTH: Pulses/marks and pause/spaces have different length, often the bit length is constant, like MagiQuest. Can be decoded using the PULSE_DISTANCE decoding.

Input is IrReceiver.irparams.rawbuf[] Output is IrReceiver.decodedIRData.decodedRawData

Parameters
aNumberOfBitsNumber of bits to decode from irparams.rawbuf[] array.
aStartOffsetOffset in irparams.rawbuf[] to start decoding. Must point to a mark.
aOneMicrosTiming value for 1
aIsPulseWidthProtocolIf true the aOneThresholdMicros id the mark threshold for 1, otherwise the space threshold
aMSBfirstIf true send Most Significant Bit first, else send Least Significant Bit (lowest bit) first.

Definition at line 748 of file IRReceive.hpp.

◆ decodePulseDistanceWidthData_P()

void IRrecv::decodePulseDistanceWidthData_P ( PulseDistanceWidthProtocolConstants const *  aProtocolConstantsPGM,
uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset = 3 
)

Definition at line 1117 of file IRReceive.hpp.

◆ decodeStrictPulseDistanceWidthData()

bool IRrecv::decodeStrictPulseDistanceWidthData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint16_t  aOneMarkMicros,
uint16_t  aOneSpaceMicros,
uint16_t  aZeroMarkMicros,
uint16_t  aZeroSpaceMicros,
bool  aMSBfirst 
)

Definition at line 958 of file IRReceive.hpp.

◆ decodeWithThresholdPulseDistanceWidthData()

void IRrecv::decodeWithThresholdPulseDistanceWidthData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint16_t  aOneThresholdMicros,
bool  aIsPulseWidthProtocol,
bool  aMSBfirst 
)

New threshold decoder to be activated by USE_THRESHOLD_DECODER Assumes a 0 for shorter and a 1 for longer timing.

Thus the value must be eventually inverted by the calling protocol decoder (MagiQuest). In normal decoder we check the if we have a timing for a 1 (normally the longer timing) within a range of 75 % and 125 % of the nominal timing see TICKS_LOW. Many protocols have a ratio of 1 to 3 between short and long timing. In this case this decoder extends the range to 66% and the upper bound does not matter anyway. I hope that this will give slightly better results especially for

  • jittering signals
  • protocols with a smaller timing ratio than 1 to 2
  • protocols with short 1 pulses / pauses like MagiQuest. Requires up to 458 bytes more program space, if more than 1 protocol is involved. but saves 90 bytes if only e.g. NEC is selected.
Parameters
aNumberOfBitsNumber of bits to decode from irparams.rawbuf[] array.
aStartOffsetOffset in irparams.rawbuf[] to start decoding. Must point to a mark.
aOneThresholdMicrosThreshold value for 1
aIsPulseWidthProtocolIf true the aOneThresholdMicros id the mark threshold for 1, otherwise the space threshold
aMSBfirstIf true send Most Significant Bit first, else send Least Significant Bit (lowest bit) first.

Definition at line 828 of file IRReceive.hpp.

◆ disableIRIn()

void IRrecv::disableIRIn ( )

Alias for stop().

Definition at line 482 of file IRReceive.hpp.

◆ enableIRIn()

void IRrecv::enableIRIn ( )

Alias for start().

Definition at line 418 of file IRReceive.hpp.

◆ end()

void IRrecv::end ( )

Alias for stop().

Definition at line 488 of file IRReceive.hpp.

◆ getBiphaselevel()

uint_fast8_t IRrecv::getBiphaselevel ( )

Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer.

The RC5/6 decoding is easier if the data is broken into time intervals. E.g. if the buffer has mark for 2 time intervals and space for 1, successive calls to getBiphaselevel will return 1, 1, 0.

          _   _   _   _   _   _   _   _   _   _   _   _   _
    _____| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |
           ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^    Significant clock edge
          _     _   _   ___   _     ___     ___   _   - Mark

Data _____| |___| |_| |_| |_| |___| |___| |_| | - Data starts with a mark->space bit 1 0 0 0 1 1 0 1 0 1 1 - Space A mark to space at a significant clock edge results in a 1 A space to mark at a significant clock edge results in a 0 (for RC6) Returns current level [MARK or SPACE] or -1 for error (measured time interval is not a multiple of sBiphaseTimeUnit).

Definition at line 1156 of file IRReceive.hpp.

◆ getMarkExcessMicros()

int getMarkExcessMicros ( )

Getter function for MARK_EXCESS_MICROS.

Definition at line 1504 of file IRReceive.hpp.

◆ getProtocolString()

const char* getProtocolString ( decode_type_t  aProtocol)

Definition at line 98 of file IRProtocol.hpp.

◆ initBiphaselevel()

void IRrecv::initBiphaselevel ( uint_fast8_t  aRCDecodeRawbuffOffset,
uint16_t  aBiphaseTimeUnit 
)

Definition at line 1134 of file IRReceive.hpp.

◆ initDecodedIRData()

void IRrecv::initDecodedIRData ( )

Is internally called by decode before calling decoders.

Must be used to setup data, if you call decoders manually.

Definition at line 515 of file IRReceive.hpp.

◆ IRReceiveTimerInterruptHandler()

void IRReceiveTimerInterruptHandler ( )

Definition at line 282 of file IRReceive.hpp.

◆ isIdle()

bool IRrecv::isIdle ( )

Returns status of reception.

Returns
true if no reception is on-going.

Definition at line 496 of file IRReceive.hpp.

◆ MATCH()

bool MATCH ( uint16_t  measured_ticks,
uint16_t  desired_us 
)

Definition at line 1403 of file IRReceive.hpp.

◆ MATCH_MARK()

bool MATCH_MARK ( uint16_t  measured_ticks,
uint16_t  desired_us 
)

Definition at line 1451 of file IRReceive.hpp.

◆ MATCH_SPACE()

bool MATCH_SPACE ( uint16_t  measured_ticks,
uint16_t  desired_us 
)

Definition at line 1497 of file IRReceive.hpp.

◆ matchMark()

bool matchMark ( uint16_t  aMeasuredTicks,
uint16_t  aMatchValueMicros 
)

Compensate for marks exceeded by demodulator hardware.

Returns
true, if values match

Definition at line 1411 of file IRReceive.hpp.

◆ matchSpace()

bool matchSpace ( uint16_t  aMeasuredTicks,
uint16_t  aMatchValueMicros 
)

Compensate for spaces shortened by demodulator hardware.

Returns
true, if values match

Definition at line 1459 of file IRReceive.hpp.

◆ matchTicks() [1/2]

bool matchTicks ( uint16_t  aMeasuredTicks,
uint16_t  aMatchValueMicros 
)

Match function WITHOUT compensating for marks exceeded or spaces shortened by demodulator hardware.

Returns
true, if values match

Definition at line 1348 of file IRReceive.hpp.

◆ matchTicks() [2/2]

bool matchTicks ( uint16_t  aMeasuredTicks,
uint16_t  aMatchValueMicros,
int16_t  aCompensationMicrosForTicks 
)

Match function WITH compensating for marks exceeded or spaces shortened by demodulator hardware.

Returns
true, if values match

Definition at line 1378 of file IRReceive.hpp.

◆ printActiveIRProtocols() [1/2]

void IRrecv::printActiveIRProtocols ( Print *  aSerial)
static

Definition at line 1538 of file IRReceive.hpp.

◆ printActiveIRProtocols() [2/2]

void printActiveIRProtocols ( Print *  aSerial)

Definition at line 1546 of file IRReceive.hpp.

◆ read()

IRData * IRrecv::read ( )

Returns pointer to IrReceiver.decodedIRData if IR receiver data is available, else nullptr.

Definition at line 550 of file IRReceive.hpp.

◆ ReceiveInterruptHandler()

void IRrecv::ReceiveInterruptHandler ( )

Definition at line 122 of file IRReceive.hpp.

◆ registerReceiveCompleteCallback()

void IRrecv::registerReceiveCompleteCallback ( void(*)(void)  aReceiveCompleteCallbackFunction)

Sets the function to call if a complete protocol frame has arrived.

Definition at line 374 of file IRReceive.hpp.

◆ restartAfterSend()

void IRrecv::restartAfterSend ( )

Restarts receiver after send.

Is a NOP if sending does not require a timer.

Definition at line 459 of file IRReceive.hpp.

◆ restartTimer() [1/2]

void IRrecv::restartTimer ( )

Definition at line 402 of file IRReceive.hpp.

◆ restartTimer() [2/2]

void IRrecv::restartTimer ( uint32_t  aMicrosecondsToAddToGapCounter)

Configures the timer and the state machine for IR reception.

Does not call resume()! We assume, that timer interrupts are disabled here, otherwise it makes no sense to use this functions. Therefore we do not need to guard the change of the volatile TickCounterForISR here :-). The tick counter value is already at 100 when decode() gets true, because of the 5000 us minimal gap defined in RECORD_GAP_MICROS. If TickCounterForISR is not adjusted with the value of the microseconds, the timer was stopped, it can happen, that a new IR frame is recognized as a repeat, because the value of RECORD_GAP_MICROS was not reached by TickCounterForISR counter before receiving the new IR frame.

Parameters
aMicrosecondsToAddToGapCounterTo compensate for the amount of microseconds the timer was stopped / disabled.

Definition at line 432 of file IRReceive.hpp.

◆ restartTimerWithTicksToAdd()

void IRrecv::restartTimerWithTicksToAdd ( uint16_t  aTicksToAddToGapCounter)

Configures the timer and the state machine for IR reception.

Does not call resume()!

Parameters
aTicksToAddToGapCounterTo compensate for the amount of ticks the timer was stopped / disabled.

Definition at line 444 of file IRReceive.hpp.

◆ resume()

void IRrecv::resume ( )

Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame.

Internal counting of gap timing is independent of StateForISR and therefore independent of call time of resume().

Definition at line 504 of file IRReceive.hpp.

◆ setReceivePin()

void IRrecv::setReceivePin ( uint_fast8_t  aReceivePinNumber)

Sets / changes the receiver pin number.

Definition at line 336 of file IRReceive.hpp.

◆ start()

void IRrecv::start ( )

Start the receiving process.

This configures the timer and the state machine for IR reception and enables the receive sample timer interrupt which consumes a small amount of CPU every 50 us.

Definition at line 384 of file IRReceive.hpp.

◆ stop()

void IRrecv::stop ( )

Disables the timer for IR reception.

Definition at line 468 of file IRReceive.hpp.

◆ stopTimer()

void IRrecv::stopTimer ( )

Definition at line 475 of file IRReceive.hpp.

Variable Documentation

◆ IrReceiver

IRrecv IrReceiver

The receiver instance.

Definition at line 64 of file IRReceive.hpp.

◆ PROGMEM

const char* const ProtocolNames [] PROGMEM = "UNKNOWN"

Definition at line 46 of file IRProtocol.hpp.

◆ ProtocolNames

const char *const ProtocolNames
Initial value:
= { string_Unknown, string_PulseWidth, string_PulseDistance, string_Apple, string_Denon, string_JVC, string_LG, string_LG2,
string_NEC, string_NEC2, string_Onkyo, string_Panasonic, string_Kaseikyo, string_Kaseikyo_Denon, string_Kaseikyo_Sharp,
string_Kaseikyo_JVC, string_Kaseikyo_Mitsubishi, string_RC5, string_RC6, string_RC6A, string_Samsung, string_SamsungLG,
string_Samsung48, string_Sharp, string_Sony
, string_BangOlufsen, string_BoseWave, string_Lego, string_MagiQuest, string_Whynter, string_FAST, string_Other
}

Definition at line 83 of file IRProtocol.hpp.

◆ sBiphaseCurrentTimingIntervals

uint16_t sBiphaseCurrentTimingIntervals

Definition at line 1130 of file IRReceive.hpp.

◆ sBiphaseDecodeRawbuffOffset

uint_fast8_t sBiphaseDecodeRawbuffOffset

Definition at line 1129 of file IRReceive.hpp.

◆ sBiphaseTimeUnit

uint16_t sBiphaseTimeUnit

Definition at line 1132 of file IRReceive.hpp.

◆ sBiphaseUsedTimingIntervals

uint_fast8_t sBiphaseUsedTimingIntervals

Definition at line 1131 of file IRReceive.hpp.

◆ sMicrosAtLastStopTimer

unsigned long sMicrosAtLastStopTimer = 0

Definition at line 70 of file IRReceive.hpp.