The Countdown to Maker Faire Bay Area is On!


Control Arduino with a universal remote

Control Arduino with a universal remote

Universal Remote Code

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

Infraredcontrol Arduino Crop
Infrared remote control receiver for Arduino

2 thoughts on “Control Arduino with a universal remote

  1. rgm says:

    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

    #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.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Maker Faire Bay Area 2023 30% off early bird ticket sales ends August 31st, 2023!

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Prices Increase in....