IRremote
IRrecv Class Reference

Main class for receiving IR signals. More...

#include <IRremoteInt.h>

Collaboration diagram for IRrecv:

Public Member Functions

 IRrecv ()
 Instantiate the IRrecv class. More...
 
 IRrecv (uint_fast8_t aReceivePin)
 
 IRrecv (uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin)
 Instantiate the IRrecv class. More...
 
void setReceivePin (uint_fast8_t aReceivePinNumber)
 Sets / changes the receiver pin number. More...
 
void 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 start ()
 Configures the timer and the state machine for IR reception. More...
 
void enableIRIn ()
 Alias for start(). More...
 
void start (uint32_t aMicrosecondsToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void restartAfterSend ()
 Restarts receiver after send. More...
 
bool available ()
 Returns true if IR receiver data is available. More...
 
IRDataread ()
 If IR receiver data is available, returns pointer to IrReceiver.decodedIRData, else NULL. More...
 
void stop ()
 Disables the timer for IR reception. More...
 
void disableIRIn ()
 Alias for stop(). More...
 
void end ()
 Alias for stop(). More...
 
bool isIdle ()
 Returns status of reception. More...
 
bool decode ()
 The main decode function, attempts to decode the recently receive IR signal. More...
 
void resume ()
 Restart the ISR state machine Enable receiving of the next value. More...
 
void printIRResultMinimal (Print *aSerial)
 Function to print protocol number, address, command, raw data and repeat flag of IrReceiver.decodedIRData in one short line. More...
 
void printIRResultRawFormatted (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the timings in IrReceiver.decodedIRData.rawDataPtr->rawbuf[] array 8 values per line. More...
 
void printIRResultAsCVariables (Print *aSerial)
 Print results as C variables to be used for sendXXX() More...
 
void printIRResultShort (Print *aSerial)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
void printIRSendUsage (Print *aSerial)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
const __FlashStringHelper * getProtocolString ()
 
void compensateAndPrintIRResultAsCArray (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the IrReceiver.decodedIRData.rawDataPtr->rawbuf[] to be used as C definition for sendRaw(). More...
 
void compensateAndPrintIRResultAsPronto (Print *aSerial, unsigned int frequency=38000U)
 Print the result (second argument) as Pronto Hex on the Print supplied as argument. More...
 
void compensateAndStoreIRResultInArray (uint8_t *aArrayPtr)
 Store the decodedIRData to be used for sendRaw(). More...
 
size_t compensateAndStorePronto (String *aString, unsigned int frequency=38000U)
 
bool decodePulseDistanceData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, unsigned int aBitMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroSpaceMicros, bool aMSBfirst)
 Decode pulse distance protocols. More...
 
bool decodePulseWidthData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, unsigned int aOneMarkMicros, unsigned int aZeroMarkMicros, unsigned int aBitSpaceMicros, bool aMSBfirst)
 Decode pulse width protocols. More...
 
bool decodeBiPhaseData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint_fast8_t aStartClockCount, uint_fast8_t aValueOfSpaceToMarkTransition, unsigned int aBiphaseTimeUnit)
 
void initBiphaselevel (uint_fast8_t aRCDecodeRawbuffOffset, unsigned int aBiphaseTimeUnit)
 
uint_fast8_t getBiphaselevel ()
 Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer. More...
 
bool decodeBoseWave ()
 
bool decodeDenon ()
 
bool decodeJVC ()
 
bool decodeKaseikyo ()
 
bool decodeLegoPowerFunctions ()
 
bool decodeLG ()
 
bool decodeMagiQuest ()
 
bool decodeNEC ()
 
bool decodeRC5 ()
 Try to decode data as RC5 protocol. More...
 
bool decodeRC6 ()
 Try to decode data as RC6 protocol. More...
 
bool decodeSamsung ()
 
bool decodeSharp ()
 
bool decodeSony ()
 
bool decodeWhynter ()
 
bool decodeDistance ()
 
bool decodeHash ()
 
bool decodeShuzu ()
 
bool decodeDenonOld (decode_results *aResults)
 
bool decodeJVCMSB (decode_results *aResults)
 
bool decodeLGMSB (decode_results *aResults)
 
bool decodeNECMSB (decode_results *aResults)
 
bool decodePanasonicMSB (decode_results *aResults)
 Old MSB first decoder. More...
 
bool decodeSonyMSB (decode_results *aResults)
 
bool decodeSAMSUNG (decode_results *aResults)
 
bool decodeHashOld (decode_results *aResults)
 
bool decode (decode_results *aResults) __attribute__((deprecated("Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> .")))
 
void blink13 (uint8_t aEnableLEDFeedback) __attribute__((deprecated("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback().")))
 Old deprecated function name for setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback() More...
 
void initDecodedIRData ()
 Is internally called by decode before calling decoders. More...
 
uint_fast8_t compare (unsigned int oldval, unsigned int newval)
 

Static Public Member Functions

static void printActiveIRProtocols (Print *aSerial)
 

Public Attributes

IRData decodedIRData
 
decode_type_t lastDecodedProtocol
 
uint32_t lastDecodedAddress
 
uint32_t lastDecodedCommand
 
uint8_t repeatCount
 

Detailed Description

Main class for receiving IR signals.

Definition at line 184 of file IRremoteInt.h.

Member Function Documentation

◆ compare()

uint_fast8_t IRrecv::compare ( unsigned int  oldval,
unsigned int  newval 
)

◆ decodeBiPhaseData()

bool IRrecv::decodeBiPhaseData ( uint_fast8_t  aNumberOfBits,
uint_fast8_t  aStartOffset,
uint_fast8_t  aStartClockCount,
uint_fast8_t  aValueOfSpaceToMarkTransition,
unsigned int  aBiphaseTimeUnit 
)

◆ decodeHash()

bool IRrecv::decodeHash ( )

◆ decodeHashOld()

bool IRrecv::decodeHashOld ( decode_results aResults)

◆ decodeMagiQuest()

bool IRrecv::decodeMagiQuest ( )

Definition at line 114 of file ir_MagiQuest.hpp.

◆ decodeShuzu()

bool IRrecv::decodeShuzu ( )

Definition at line 170 of file ir_Template.hpp.

Member Data Documentation

◆ decodedIRData

IRData IRrecv::decodedIRData

Definition at line 308 of file IRremoteInt.h.

◆ lastDecodedAddress

uint32_t IRrecv::lastDecodedAddress

Definition at line 312 of file IRremoteInt.h.

◆ lastDecodedCommand

uint32_t IRrecv::lastDecodedCommand

Definition at line 313 of file IRremoteInt.h.

◆ lastDecodedProtocol

decode_type_t IRrecv::lastDecodedProtocol

Definition at line 311 of file IRremoteInt.h.

◆ repeatCount

uint8_t IRrecv::repeatCount

Definition at line 315 of file IRremoteInt.h.


The documentation for this class was generated from the following files: