Commit 1035e7bf authored by Jari's avatar Jari

documentation

parent b5e55995
Change Log for IRLib – an Arduino library for infrared encoding and decoding
Copyright 2013-2015 by Chris Young http://tech.cyborg5.com/irlib/
Version 1.51 March 2015
Added USE_ATTACH_INTERRUPTS define to allow disabling IRrecvPCI and IRfrequency both of which use the built-in "attachInterrupt()" function that can cause conflicts with other ISR routines using INT0_vect.
Version 1.5 June 2014
New bit-bang option for PWM output frequency setting. Now can use any output pin with no hardware timers. Note:bit-bang output not as accurate as timer-based frequency selection.
Major rewrite of IRLibTimer.h to facilitate bit-bang. Separated hardware timer selection and specification into sending and receiving sections in order to implement bit-bang.
New IRfrequency class for detecting input frequencies. Previously was a stand-alone special sketch but now is a class including a DumpResults method.
New IRfreq and IRrecvDumpFreq illustrate simultaneous detection of frequency and pattern with both an IR learner and IR receiver is connected.
New #define USE_IRRECV define can be commented out to completely remove the interrupt driven IRrecv receiver class from the library. This resolves ISR conflicts with other libraries such as Tone() when not using IRrecv class.
New #define USE_DUMP define can be commented out to disable DumpResults methods. Saves code space when these methods are not needed.
Revised user manuals to document new features and correct previous documentation problems.
Version 1.42 May 2014
Added support ATmega256RFR2 based Pinoccio Scout platform with examples
Version 1.41 April 2014
Fixed interframe delay for JVC protocol
Version 1.4 – March 2014
Added IRLIB_ prefix to debug macros to avoid name collisions
Debug macros now report more information
Added example new protocol Phillips RCMM used by AT&T U-Verse boxes and Nokia satellite boxes
Added ABS_MATCH macro which allows you to match using absolute number of microseconds versus the old way which used a percentage. Necessary for implementing RCMM protocol.
Added IRLIB_USE_PERCENT definition which when commented out changes the default from percentage match to absolute match. Also added DEFAULT_ABS_TOLERANCE. More details on these changes will be provided in the documentation when the section on adding new protocols is completed.
Version 1.31 – March 2014
Commented out debug code that was accidentally left active in 1.3 release
Version 1.3 – January 2014
NEW FILES
Added new file IRLibRData.h and moved irparams structure and related items to that file. Allows users to create custom IRrecv classes
NEW EXAMPLES
Rewrote Samsung36 example to include both send and receive
Added new examples for new protocols DirecTV and GIcable
Added new example IRanalyze gives more detailed analysis of timing. Useful in analyzing the protocols
Added new example IRfreq reports modulation frequency of a signal. Requires TSMP58000 IR learner chip
Cleanup of other example routines.
NEW CLASSES
Created IRrecvBase class to allow custom receiver classes. IRrecv is now a derived class from it.
Created IRrecvLoop class which receives IR signals without using any hardware interrupts or timers. Also created IRrecvPCI class which uses Pin Change Interrupts to receive IR signals. These new receivers are more accurate than the 50µs timing of the original IRrecv. However they also have other limitations described in comments.
New functions, variables and methods
In IRrecvBase added "unsigned char Mark_Excess" with default value 100. Was a define macro but now is user settable.
In IRrecvBase added method "unsigned char getPinNum(void);" which retrieves the pin number used from irparams.recvpin. This value not normally accessible to end user.
Globally available function "void do_Blink(void);" blinks pin 13 LED. For use by user created extensions of IRrecvBase.
INTERNAL CHANGES
Data collected by IRrecvBase classes in irparams.rawbuf is now converted to actual microseconds rather than clock ticks of 50 µs each. IRrecvBase::GetResults has a new parameter "Time_per_Ticks" that is used to convert ticks into actual microseconds if needed.
Adjustments to mark and space to deal with overreporting and underreporting of intervals is now done once in IRrecvBase::GetResults eliminating the need for MATCH_MARK(d,v) and MATCH_SPACE(d,v). Just use MATCH(d,v) everywhere.
Modified IRLibsendBase::mark() and IRLibsendBase::space() to overcome limitations of "delayMicroseconds()".
Changed many int to char or unsigned char to save memory
Eliminated DEBUG macro in IRLib.h and its use elsewhere. Macro TRACE is more useful.
Changed IRTYPES to unsigned char and a list of #defines rather than an enum (even though I still really like enums, changing it saves memory)
MEMORY EFFICIENCY
Code changes result in memory savings of approximately 54 bytes in code space and 39 bytes of RAM.
--------------------------------
Version 1.2 – July 2013
Internal version. No public release
--------------------------------
Version 1.1 – April 2013
Constructor of IRsendBase now initializes output pin and forces it low immediately.
New IRrecv::No_Output() method initializes output pin and forces it low. Use this in sketches which receive only by the have output hardware connected.
Added examples IRservo and IRserial_remote
--------------------------------
Version 1.0a – February 2013
Removed debugging test switch which was accidentally left on in file "IRLib.h"
--------------------------------
Version 1.0 – January 2013
Initial Release
\ No newline at end of file
B GNU GENERAL PUBLIC LICENSE
......
IRLib – an Arduino library for infrared encoding and decoding
Version 1.51 March 2015
Copyright 2013-2015 by Chris Young http://tech.cyborg5.com/irlib/
This library is a major rewrite of IRemote by Ken Shirriff which was covered
by GNU LESSER GENERAL PUBLIC LICENSE which as I read it allows me to make
modified versions. That same license applies to this modified version. See
his original copyright below.
Simple library to make things easier for Arduino newbies.
The latest Ken Shirriff code can be found at
https://github.com/shirriff/Arduino-IRremote
Includes 10 IR remote control signal codes from the random
controller I found from the trash, they need to be changed
in order to use the code with another remote.
My purpose was to reorganize the code to make it easier to add or remove
protocols. As a result I have separated the act of receiving a set of raw timing
codes from the act of decoding them by making them separate classes. That way
the receiving aspect can be more black box and implementers of decoders and
senders can just deal with the decoding of protocols.
Also expects there to be a motor connected to pin 6. Will
start it up with higher rotation speed and then drop back
to idle speed. Again works well with the motor I used.
Also added provisions to make the classes base classes that could be extended
with new protocols which would not require recompiling of the original library nor
understanding of its detailed contents. Some of the changes were made to reduce
code size such as unnecessary use of long versus bool. Some changes were just my
weird programming style. Also extended debugging information added.
IRremote
Version 0.1 July, 2009
Copyright 2009 Ken Shirriff
For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.htm
http://arcfn.com
Interrupt code based on NECIRrcv by Joe Knapp
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
****************************************************
The package contains:
IRLib.cpp Code for the library written in object C++
IRLib.h Header file which you will include in your sketch
IRLibMatch.h Match macros used internally. Need not include this unless you implement
your own protocols
iRLibTimer.h Attempts to detect type of Arduino board and allows you to modify which
interrupt timer you will use. Defaults to timer 2 as did the original KS
library. Alternate board and timer information based on a fork of the
original KS library. That for can be found here.
https://github.com/TKJElectronics/Arduino-IRremote
IRLibRData.h Moved irparams structure and related data to this header to facilitate
user created extensions to IRrecvBase.
Note: there is no "IRremoteInt.h" header as in the original library. Those values were
moved elsewhere.
The examples directory contains:
IRanalyze Dumps detailed information about a recent signal. Useful for analyzing
unknown protocols
IRfreq Reports modulation frequency of IR signal. Requires TSMP58000 IR learner
IRhashdecode Demonstrates hash decoder.
IRrecord Recording incoming signal and play it back when a character is sent
through the serial console. By using the console you no longer need
to wire up a pushbutton to run this code.
IRrecvDump Receives a code, attempts to decode it, produces well formatted
output of the results using the new "dump" method.
IRsendDemo Simplistic demo to send a Sony DVD power signal every time a
character is received from the serial monitor.
IRsendJVC Demonstrates sending a code using JVC protocol which is tricky.
IRservo Demonstrates controlling a servo motor using an IR remote
IRserial_remote Demonstrates a Python application that runs on your PC and sends
serial data to Arduino which in turn sends IR remote signals.
Samsung36 Demonstrates how to expand the library without recompiling it.
Also demonstrates how to handle codes that are longer than 32 bits.
DirecTV Demonstrates additional protocol for DirecTV
GIcable Demonstrates additional protocol for GIcable used by Motorola cable boxes
rcmm Additional protocol Phillips RCMM used by AT&T U-Verse boxes
pinoccio Demo sketches for Pinoccio Scout platform using ATmega256RFR2
Arduino 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.docx Reference manual in Microsoft Word format
IRLibReference.pdf Reference manual in Adobe PDF format
Online 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)
IR sensor is to be connected to pins 9, 10 and 11. 11 is data,
10 is GND and 9 is 5V. Power is given through data pins and
failing to do so, especially if power is given to wrong pins
will most likely cause sparks. waitIR-method automatically
takes care of the power as well.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment