Compilation error with LIFA_Base.ino for LabVIEW control

A strange error when downloading the program that enables control by LabVIEW:

C:\programfiles (x86)\Arduino\Libraries\RobotIRremote\IRremoteTools.cpp:5 error 'IKD2' was not declared in this scope

On the PC is this file not present. However, when I look at a PC on my work where Arduino works flawless under LabVIEW this file is also not available; the RobotIRremote directory is absent as well.

I am stuck here, suggestions on how to solve this installation issue are welcome.

If any additional information is needed please let it know.

BR, John

On the PC is this file not present. However, when I look at a PC on my work where Arduino works flawless under LabVIEW this file is also not available; the RobotIRremote directory is absent as well.

If C:\program files (x86)\Arduino\Libraries\RobotIRremote\IRremoteTools.cpp didn't exist, the compiler would not be able to (try to) compile the file. Therefore, your assertion that the file doesn't exist is wrong.

Paul, thanks for the feedback. You were right, after a second look I did find the IRremoteTools.cpp file. Here the complete listing:

include "IRremote.h"

include "IRremoteTools.h"

include

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; }

The error in compiling is with TDK2 (not with IDK2 as mentioned in the start post). So, a few steps have been taken in finding the location in the code that is central to the error message. Not clear for me now why this error message is occurring? May-be it not declared in a .h file?

Assistence remains welcome.

Greetz, John from The Netherlands with a Arduino UNO SMD, IDE 1.5.4

Issue has been solved.

A mix-up with the work-PC. On that PC there was no C:\programfiles (x86)\Arduino\Libraries\RobotIRremote\IRremoteTools.cpp file, it was present on my home PC. For my home PC the LIFA base program was copied from another PC. I had re-installed Arduino and found an original LIFA_base.ino file on my own PC. This file can be compiled without any issue.

Hello
i’m getting this error after compile the LIFA_Base.ino
i have downloaded and putted in the same directory the various classes but the one that gives the error is the IRRemoteInt…
does anyone have the same problem?
the error give from the compiler is:
IRremoteInt.h:202: error: ‘RAWBUF’ was not declared in this scope

ideas ??!?

My copy of the IRremoteInt.h file only has 112 lines. You appear to have an old(er) version. Get the latest version.

Hi.

I need help to solve this problem whit my arduino board.

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

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

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.