Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
IRremote library API
The API uses an IRsend object to send a code, and an IRrecv object to receive a code. The library cannot send and receive at the same time, but can switch between sending and receiving.
Creates a send object
Sends the value as an NEC-format IR code. bits specifies the length of the code, typically 16.
Sends the value as a Sony-format IR code.
Sends the value as a RC5-format IR code.
Sends the value as a RC6-format IR code.
irsend.sendRaw(buf, len, hertz)
Sends a code corresponding to the buffer of raw durations.
Creates a receiver object.
Starts listening for an IR code.
Returns 1 if there is a received code available, and 0 otherwise.
The fields of results are:
||NEC, SONY, RC5, RC6, or UNKNOWN|
||the received code value|
||The number of bits received|
||Number of records in rawbuf|
This must be called after irrecv.decode() to resume listening for a code.