Compilation error with LIFA_Base.ino for LabVIEW control

Hi All, I had the same problem and copied the code from John_R, but I still get a message error: 'TKD2' was not declared in this scope. Can anyone advise ? Thanks G

Can anyone advise ?

I advise you to post the code you can't compile. I advise you to define which Arduino you have selected, and which version of the IDE you are using.

Hi Paul, thanks a bunch for the reply, here is the code. Using 1.0.6

#include “IRremote.h”
#include “IRremoteTools.h”
#include <Arduino.h>

int RECV_PIN = TKD2; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes

void beginIRremote(){
irrecv.enableIRIn(); // Start the receiver
}

bool IRrecived(){
return irrecv.decode(&results);
}

void resumeIRremote(){
irrecv.resume(); // resume receiver
}

unsigned long getIRresult(){
return results.value;
}

Two answers/three questions is the wrong ratio. Until the ratio is greater than or equal to one, I'm not able to help you.

Ah, apologies. The board is a MEGA 2560.

int RECV_PIN = TKD2; // the pin the IR receiver is connected to

So, where do you expect TKD2 to be magically defined?

I am still getting this error code, I properly imported/added github.com/shirriff/arduino-irremote library, but I am still getting error message below. Im using the latest version of Arduino, board is OSEPP Uno. I have tried uninstalling / installing again, checked wiring on my bot. Cant seem to get the IR remote to upload.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno" C:\Program Files (x86)\Arduino\libraries\RobotIRremote\IRremoteTools.cpp:5: error: 'TKD2' was not declared in this scope

Any help will be appreciated.

I am still getting this error code,

But you are STILL not defining why you think that TKD2 should be known. That you found some code somewhere that contained a possible error is NOT a reason to keep whining that it doesn't work. You MUST explain why you think it should work.

Thank you PaulS, I see what you're saying.

The problem that I was having was the Arduino IRremote library I downloaded has not properly labeled. When I downloaded it, the name of the file was Arduino-IRremote-Master, all you have to do is simply delete the Master from the file name and make it Arduino-IRremote and libraries will compiles properly.

Hope this helps any one who had boutght OSEPP Robotic basisics kit.

Some solution?

/cdrom/home/apps/arduino-160/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 ^ Error compiling.

Some solution?

Of course. Delete that line.

Why do YOU think TKD2 IS defined?

Hi guys,

I'm getting the same error and didn't find any solution after reading this topic. I'm using arduino UNO, tried with both arduino ide 1.6.1 and 1.6.0 and tried to reinstall arduino labview interface, linx for several times.

Like with the others the error says: Arduino: 1.6.1 (Windows 8.1), Board: "Arduino Uno"

Build options changed, rebuilding all

Using library Wire in folder: C:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\Wire

Using library SPI in folder: C:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\SPI

Using library Servo in folder: C:\Program Files\arduino-nightly\libraries\Servo

Using library LiquidCrystal in folder: C:\Program Files\arduino-nightly\libraries\LiquidCrystal

Using library Robot IR Remote in folder: C:\Program Files\arduino-nightly\libraries\RobotIRremote

C:\Program Files\arduino-nightly/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\arduino-nightly\hardware\arduino\avr\cores\arduino -IC:\Program Files\arduino-nightly\hardware\arduino\avr\variants\standard -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\Wire -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\SPI -IC:\Program Files\arduino-nightly\libraries\Servo\src -IC:\Program Files\arduino-nightly\libraries\LiquidCrystal\src -IC:\Program Files\arduino-nightly\libraries\RobotIRremote\src C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\AccelStepper.cpp -o C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\AccelStepper.cpp.o

C:\Program Files\arduino-nightly/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\arduino-nightly\hardware\arduino\avr\cores\arduino -IC:\Program Files\arduino-nightly\hardware\arduino\avr\variants\standard -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\Wire -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\SPI -IC:\Program Files\arduino-nightly\libraries\Servo\src -IC:\Program Files\arduino-nightly\libraries\LiquidCrystal\src -IC:\Program Files\arduino-nightly\libraries\RobotIRremote\src C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\AFMotor.cpp -o C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\AFMotor.cpp.o

C:\Program Files\arduino-nightly/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\arduino-nightly\hardware\arduino\avr\cores\arduino -IC:\Program Files\arduino-nightly\hardware\arduino\avr\variants\standard -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\Wire -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\SPI -IC:\Program Files\arduino-nightly\libraries\Servo\src -IC:\Program Files\arduino-nightly\libraries\LiquidCrystal\src -IC:\Program Files\arduino-nightly\libraries\RobotIRremote\src C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\IRremote.cpp -o C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\IRremote.cpp.o

C:\Program Files\arduino-nightly/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\arduino-nightly\hardware\arduino\avr\cores\arduino -IC:\Program Files\arduino-nightly\hardware\arduino\avr\variants\standard -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\Wire -IC:\Program Files\arduino-nightly\hardware\arduino\avr\libraries\SPI -IC:\Program Files\arduino-nightly\libraries\Servo\src -IC:\Program Files\arduino-nightly\libraries\LiquidCrystal\src -IC:\Program Files\arduino-nightly\libraries\RobotIRremote\src C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\IRremoteTools.cpp -o C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\IRremoteTools.cpp.o

C:\Users\Arttu\AppData\Local\Temp\build1377854603117688175.tmp\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope

int RECV_PIN = TKD2; // the pin the IR receiver is connected to

^

Error compiling.

I know I don't actually need that RobotIRremote with UNO but I cant neither delete it since then I'm getting error that the RobotIRremote cant be found. So what should I do?

Thanking for your time, Arttu

i use Uno board, Windows7 64-bit. the comepile error message is

C:\Program Files (x86)\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

maybe same problem.

I'm not familiar with the Robot IR Remote. Is TKD2 assigned a # somewhere? The comment indicates a # such as 2,3,4...18, 19 would appear to be expected for an Uno.

hi every one,
i am using arduino1.6.1. when i am trying to compile lifa_base program,it is giving me error as :
"
H:\softwares\micro cntroller\arduino-1.6.1\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".
please help me out with this problem .
thank you.
PAUL could you please help me out from this issue…

As I figured it out is the problem with the Arduino IDE and the Labview library for arduino. It looks like that in arduino IDE 1.0.5-r2 everything works OK, but not with Arduino IDE 1.5.x-beta and latest IDE 1.6.4.

The solution to my problem was to use IDE 1.0.5-r2 and it worked fine. Probably they should update the Labview libraries.

Gracias wee!! Thanks man!! Danke shun!!

I have the same problem compiling a sketch that previously compiled OK, that is: "'TKD2' was not declared in this scope" compiled on Windows/7 using v1.6.4 IDE for an Arduino UNO.

I think this github post: https://github.com/z3t0/Arduino-IRremote/issues/98 explains that it is an issue with "RobotIRremote-Library of Arduino IDE 1.0.6." and is being dealt with.

Sorry for resurrect this topic, but i want to post my solution to this problem:

erase all “IR’s” libraries (from arduino nightly and from Documents>Arduino>libraries)

if you have the Cd search for IRremote.zip in 37 SENSOR KIT TUTORIAL FOR UNO (this is a example of MY cd, search on yours)

then in the Arduino IDE Program>Include Librarie>Add librarie.zip… search for your IRremote.zip

that’s all, in your code:
#include <IRremote.h>
#include <IRremoteInt.h>
“your code”

That was my solution, I hope helped someone