NOVICEGUARD HOME > > DAUGHTER BOARDS MENU     Delicious.Com Bookmark this on Delicious    StumbleUpon.Com Recommend to StumbleUpon

Receiving commands on an Arduino, commands from an ordinary infra red remote control

Scruffy initial notes. It DOES work!

From that (copy d/l'd 11 Aug 15, ...

Everything unzipped into a folder called IRRemoteShirriff. (Discarded the wrapper which was part of the zip, i.e. the Arduino-IRremote-master folder.

This with Arduino 1.0.6

That installed into Arduino Development Environment, using Sketch/ Import Library/ Add Library

Before this will run properly, you may have to deal with the "TKD2" error. Try compiling something. If you don't see a TKD2 error, don't worry. If you do, see....

(The TKD2 error is nothing to do with me, TKB)

C:\Program Files\Arduino\libraries

"Good" number, followed by gibberish, if button on controller held down. "Number": sequence of characters from range 0...9, A...F, e.g. 1CB9C was the "number" (it IS a number, if you understand hex notation) I received from a Sony music system controller, when I pressed the "stop" button

The code....

/* IR_Control_Receive
   NoviceGuard / NovGrdCore version of IRRecvDemo

   Derived, with very little changing, from....

 * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
 * An IR detector/demodulator must be connected to the input RECV_PIN.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff

#include <IRremote.h>
#include <NovGrdCore.h> //this new for NoviceGuard Version
int RECV_PIN = inPUL;//"11" changed to inPUL for NoviceGuard version,
// which means you need to plug receiver module into the Upper Left
//hand daughter board position, aka pin 2 of the Arduino.

//If you encounter the "TKD2" error (nothing to do with me, TKB!!), see...

//Nothing else was changed. Compile and upload.
//Start the serial monitor...
//Point an ordinary domestic remote control at your receiver,
//  press a button, and you should see a number appear
//  on the serial monitor. (What number you see will be
//  consistent for that make/ model of control, but, say
//  the "raise volume" command, as a number, varies from
//  controller to controller.

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
  Serial.println("IR_Control_Receive, vers 11 Aug 15");
  irrecv.enableIRIn(); // Start the receiver

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value

That's it for now! Let me know if you want me to tidy this!

How to email or write this page's editor, Tom Boyd. This page, and the software it references, ©TK Boyd, 8/2015.

Valid HTML 4.01 Transitional Page has been tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at Mostly passes, just a few "No attribute" issues, arising from Google code.

If this page causes a script to run, why? Because of things like Google panels, and the code for the search button. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....