User manual

About IR libraries
IR signals consists of a series of modulated pulses called "marks" separated by intervals called
"spaces". Typically there is a long mark and space at the beginning of each signal that serves as a
header. Then by varying the timing of marks and spaces, a sequence of bits is transmitted. If you
had to store the precise timing of the entire signal it would take an array of up to 100 16 bit integers.
In order to compare the data received to see if it was what you wanted, you would similarly need to
store large arrays of data.
Fortunately the signals are sent according to very specific protocols that allow you to take this
received timing data and turn it into a single binary number of up to 32 bits. The IR library collects
the timing information in a buffer and then turns it into a single 32 bit value. You can then easily
compare that value to the one you want.
Similarly if you want to transmit IR signals, all you need to do is pass 32 bit value to the library and
tell it what protocol you want to use. It converts that value into a stream of marks and spaces with
the proper headers, bit encodings and timings.
The gold standard of IR libraries is "LIRC" or Linux Infrared Remote Control which can be found
at http://www.lirc.org/ (http://adafru.it/ez7). It consists of drivers and a large database of information
on hundreds of various remote controls. If we are using a Linux based system it's definitely the way
to go. We will not be discussing that library here as we intend to focus on Arduino based systems.
In August 2009 Ken Shirrff published "IRremote" on his blog (http://adafru.it/cJI) and released it on
GitHub (http://adafru.it/cR1). Then in January 2013 I released IRLib based on Ken's earlier work.
This revision reorganize the code making it easier to add new protocols using object-oriented
programming design in C++.
Detailed information about IRLib can be found on my blog
at http://tech.cyborg5.com/irlib/ (http://adafru.it/ez8). It includes an extensive user manual which is
also available in the "manuals" folder of the library.. We'll use IRLib in this tutorial to help you get
started.
© Adafruit Industries https://learn.adafruit.com/using-an-infrared-library Page 4 of 23