User manual

Receiving and Decoding IR
Software installation
Installation of the IRLib library is as follows:
1. Visit the IRLib page on GitHib (http://adafru.it/ez9).
2. Select theDownload ZIP” button, or simply click this link (http://adafru.it/eza) to download
directly.
3. Uncompress the ZIP file after it’s finished downloading.
4. The resulting folder should be named "IRLib-master" and will contain a number of header
files, IRLib.cpp and two subfolders containing a user manual and some example
sketches. Sometimes in Windows you’ll get an intermediate-level folder and need to move
things around.
5. Rename the folder (containing the .cpp and .h files and the examples and manual
subdirectories) toIRLib and place it alongside your other Arduino libraries, typically in your
(home folder)/Documents/Arduino/Libraries folder. Libraries should not be installed alongside
the Arduino application itself.
6. Re-start the Arduino IDE if it’s currently running.
Here’s a tutorial (http://adafru.it/aYM) that walks through the process of correctly installing Arduino
libraries.
Hardware Needed
IRLib runs on 8-bit AVR based Arduino boards such as Uno, Leonardo, Mega and Micro. It also
runs on the Leonardo portion of the Arduino Yun. It does not work on 32-bit ARM processors such
as the Arduino Due or other Arduino-like systems. Unfortunately at this time it does not run on
ATtiny85 base systems such as Adafruit Trinket and Adafruit Gemma but support for that is in the
job jar and should be available in a stripped-down version for those platforms in the near future. At
this writing, it has not been tested on the Adafruit Trinket Pro however since it is based on the same
ATmega328 processor as the Uno, it should work fine. So the first thing you need is Arduino Uno or
other compatible board.
You will need an IR receiver. Such as the TSOP38238 shown on the right column under featured
products. This device combines an IR sensitive photocell, a 38 kHz bandpass filter, and automatic
gain control. It operates on a variety of supply voltages including 3.3v and 5v. It de-modulates the
received IR signal and gives you a nice clean square wave of off and on pulses at the voltage level
of your power supply. This means it is ideal for feeding its output directly into the digital input pin of
our Arduino.
Finally you will need an IR remote such as you use for controlling your TV, cable box, or DVD
player. All of our examples will use the Adafruit Mini Remote Control shown on the right however we
will show you how to detect what protocol your own TV remote is using and if it is a protocol
supported by IRLib you can use it instead.
© Adafruit Industries https://learn.adafruit.com/using-an-infrared-library Page 5 of 23