
Here’s a helpful library that allows one to add simple IR control to projects
The library implements the NEC IR protocol, so set up the universal remote for any NEC device (TV, DVD, VCR, …) and the 32-bit codes should be received.
The example sketch provided just prints out IR codes as they’re received, so it’s good to run that sketch to see what codes the remote is sending, so they can later be used to trigger specific actions
Aah, libraries make code look clean! – Hardware and software details in the Arduino forums – Control Arduino with Universal Remote
2 thoughts on “Control Arduino with a universal remote”
Comments are closed.
Note that to get this library to work with Arduino 0012, at the top of your sketch (before including the library) you must clear the definition of the int() macro:
// This comment is line 1 of the program
int thisIsntUsedAtAll;
#undef int
…
#include
#define IRPIN 4
….
The problem seems to be the “function-like” casting macros recently added to wiring.h. The un-used integer (or any non-comment program statement) is required in order for the final C files to be concatenated together in the right order — there’s probably a more elegant way, but this is the first thing that worked for me.
Thank you very much for the library.