Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: John_R on Oct 27, 2014, 10:37 pm

Title: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: John_R on Oct 27, 2014, 10:37 pm
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
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Oct 28, 2014, 01:40 am
Quote
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: John_R on Oct 28, 2014, 10:57 pm
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 <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;
}

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

 
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: John_R on Oct 31, 2014, 10:45 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Rumbarolo on Nov 04, 2014, 09:31 pm
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 ??!?
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Nov 05, 2014, 02:36 am
My copy of the IRremoteInt.h file only has 112 lines. You appear to have an old(er) version. Get the latest version.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Julio_Romero_Vargas on Jan 30, 2015, 11:43 pm
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
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Goat_T on Jan 31, 2015, 12:12 pm
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
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Jan 31, 2015, 04:21 pm
Quote
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Goat_T on Jan 31, 2015, 04:36 pm
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;
}
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Jan 31, 2015, 04:55 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Goat_T on Feb 01, 2015, 09:52 am
Ah, apologies. The board is a MEGA 2560.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Feb 01, 2015, 09:21 pm
Code: [Select]
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
So, where do you expect TKD2 to be magically defined?

Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: buildOrBeRebuilt on Feb 04, 2015, 08:08 am
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Feb 06, 2015, 08:09 pm
Quote
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: buildOrBeRebuilt on Feb 07, 2015, 06:42 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: stivyw on Feb 12, 2015, 07:34 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: PaulS on Feb 13, 2015, 02:40 am
Quote
Some solution?
Of course. Delete that line.

Why do YOU think TKD2 IS defined?
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Arttuhon on Mar 08, 2015, 12:49 pm
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
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: kukimsd on Mar 10, 2015, 01:46 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: CrossRoads on Mar 10, 2015, 01:50 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: surya_s_m on Apr 30, 2015, 07:22 pm
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...
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: _ls_ on Jul 16, 2015, 03:53 pm
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: Telluino on Jul 27, 2015, 04:36 am
Gracias wee!!
Thanks man!!
Danke shun!!
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: ArduinoEnthusiast on Dec 18, 2015, 02:23 am
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.
Title: Re: Compilation error with LIFA_Base.ino for LabVIEW control
Post by: JosephINO on Dec 29, 2016, 07:38 pm
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