EasyManua.ls Logo

DFRobot FireBeetle ESP32-E - Page 54

DFRobot FireBeetle ESP32-E
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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