Wednesday, January 15, 2014

Arduino IR Remote Control

As part of my starter kit I received

and


I wanted to use these two items to add remote control to a RF based networked light controller.  The first stumbling block was that the IRemote Arduino library did not work.  The fix was to update an Include statement in the file - IRremoteInt.h.  However - this only worked when I modified the file in My Documents/Arduino/Library.  Makes sense as this as my code used the <> tag to reference this library so it was picking it up from the default location.  

Modified code is below.


/* * IRremote * Version 0.1 July, 2009 * Copyright 2009 Ken Shirriff * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html * * Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers * * 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/ */ #ifndef IRremoteint_h#define IRremoteint_h #include <Arduino.h>



Here is my cookbook page:













No comments:

Post a Comment