I have brought my laptop away from home with me to do some programming and want to program a board I have made with an infrared sensor and an old tv remote as a txer everything works on my computer at home but when I try to compile the following sketch
/*
* 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
* http://arcfn.com
* altered to work with any ir chip.
* left to right output, 0 volts, vcc.
* except ir with four pins on the top, left to right output, vcc, 0 volts.
*/
#include <IRremote.h>
int RECV_PIN = 5;
IRrecv irrecv(RECV_PIN);
decode_results results;
int a;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) // have we received an IR signal?
{
for (int z=0; z<1; z++) // ignore 2nd and 3rd signal repeat
{
a = (results.value);
Serial.print ("\n");// same as using Serial.println
irrecv.resume(); // receive the next value
a = (results.value);
}
}
}
all I get is
C:\Program Files\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
The laptop has just had all the arduino software loaded onto it and this is the first time I have tried it but the sketches are from my dropbox so they all work.
Does anyone know why TKD2 is not declared? It looks to me like it is declared as pin 5?
or is there some other problem?
thanks.