IRrecv class can be used to receive and decode infrared signals. Before using this class, you need to instantiate an object of the class. Its
member functions are as follows.
IRrecv()
Description: construct function of IRrecv class. Specify the pin the IR receiver connects to on Arduino. Syntax: IRrecvobject(recvpin)
Parameter:
object: user-defined object name
recvpin: Arduino pin connect to IR receiver
enableIRIn()
Description: Init IR decoder Syntax: IRrecv. enableIRIn()
Parameter:
IRrecv: an object of IRrecv class
decode()
Description: detect if an IR signal is received Syntax: IRrecv.decode( &.results)
Parameter:
IRrecv: an object of IRrecv class
results: an object of decode_results class
Return*: int type. Returns 0 if a code was received, or 1if nothing received yet
resume()
Description: Receive the next ir code Syntax: IRrecv.resume()
Parameter:
IRrecv: an object of IRrecv class.
Return*: none
Need help?
Do you have a question about the FireBeetle ESP32-E and is the answer not in the manual?
Questions and answers