- Notifications
You must be signed in to change notification settings - Fork76
An Arduino library for encoding and decoding infrared remote signals
License
cyborg5/IRLib
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Version 1.51 March 2015Copyright 2013-2015 by Chris Younghttp://tech.cyborg5.com/irlib/
NOTICE: This library is no longer being maintained. It has been superseded by IRLib2 which is a major restructuring of the code with many new features. Unfortunately we were not able to maintain backwards compatibility with this library. It should however be relatively easy to update sketches to the new code. We will leave this repository available for those who do not wish to update their code. Please do not submit pull requests or raise issues with this repository. All such issues should be handled with IRLib2 which is available at
This library is a major rewrite of IRemote by Ken Shirriff which was coveredby GNU LESSER GENERAL PUBLIC LICENSE which as I read it allows me to makemodified versions. That same license applies to this modified version. Seehis original copyright below.
The latest Ken Shirriff code can be found athttps://github.com/shirriff/Arduino-IRremote
My purpose was to reorganize the code to make it easier to add or removeprotocols. As a result I have separated the act of receiving a set of raw timingcodes from the act of decoding them by making them separate classes. That waythe receiving aspect can be more black box and implementers of decoders andsenders can just deal with the decoding of protocols.
Also added provisions to make the classes base classes that could be extendedwith new protocols which would not require recompiling of the original library norunderstanding of its detailed contents. Some of the changes were made to reducecode size such as unnecessary use of long versus bool. Some changes were just myweird programming style. Also extended debugging information added.
IRremoteVersion 0.1 July, 2009Copyright 2009 Ken ShirriffFor details, seehttp://arcfn.com/2009/08/multi-protocol-infrared-remote-library.htmhttp://arcfn.com
Interrupt code based on NECIRrcv by Joe Knapphttp://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556Also influenced byhttp://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
The package contains:IRLib.cppCode for the library written in object C++IRLib.hHeader file which you will include in your sketchIRLibMatch.hMatch macros used internally. Need not include this unless you implementyour own protocolsiRLibTimer.hAttempts to detect type of Arduino board and allows you to modify whichinterrupt timer you will use. Defaults to timer 2 as did the original KSlibrary. Alternate board and timer information based on a fork of theoriginal KS library. That for can be found here.https://github.com/TKJElectronics/Arduino-IRremoteIRLibRData.hMoved irparams structure and related data to this header to facilitateuser created extensions to IRrecvBase.
Note: there is no "IRremoteInt.h" header as in the original library. Those values weremoved elsewhere.
The examples directory contains:IRanalyzeDumps detailed information about a recent signal. Useful for analyzingunknown protocolsIRfreqReports modulation frequency of IR signal. Requires TSMP58000 IR learnerIRhashdecodeDemonstrates hash decoder.IRrecordRecording incoming signal and play it back when a character is sentthrough the serial console. By using the console you no longer needto wire up a pushbutton to run this code.IRrecvDumpReceives a code, attempts to decode it, produces well formattedoutput of the results using the new "dump" method.IRsendDemoSimplistic demo to send a Sony DVD power signal every time acharacter is received from the serial monitor.IRsendJVCDemonstrates sending a code using JVC protocol which is tricky.IRservoDemonstrates controlling a servo motor using an IR remoteIRserial_remoteDemonstrates a Python application that runs on your PC and sendsserial data to Arduino which in turn sends IR remote signals.Samsung36Demonstrates how to expand the library without recompiling it.Also demonstrates how to handle codes that are longer than 32 bits.DirecTVDemonstrates additional protocol for DirecTVGIcableDemonstrates additional protocol for GIcable used by Motorola cable boxesrcmmAdditional protocol Phillips RCMM used by AT&T U-Verse boxespinoccioDemo sketches for Pinoccio Scout platform using ATmega256RFR2Arduino compatible platform. See readme.txt in pinoccio folder for details.Note: I did not port any of the other demo sketches although I may add IRTest later.The manuals directory contains:IRLibReference.docxReference manual in Microsoft Word formatIRLibReference.pdfReference manual in Adobe PDF formatOnline version of this manual is also available at:http://tech.cyborg5.com/irlib/docs/
The library handles the following protocols:NEC, Sony, RC5, RC6, Raw all of which were supported in the KS version.Additionally added Panasonic_Old, JVC, NECx.Also added KS hash code routines which he released separately.Example code included but not in the library: Samsung36, DirecTV, GIcable. rcmm (U-Verse)