12-13-2012 01:38 PM
errors(undeclared) in compiling LVIFA_Base: Arduino 1.0.3/labview 2012
12-13-2012 08:20 PM
What version of LIFA are you using?
12-14-2012 12:33 PM
Nelly,
You are going to have to give us more details on what you are trying to do, when you see this error, what code you are using etc. Provide as much information as possible so we can help you.
Thanks,
-Sam K
LIFA Developer
12-15-2012 01:04 PM
I am getting the same errors. I am using 2.2.0.79 LIFA toolkit. When I go to compile the LIFA_Base.ino I get the following errors:
LIFA_Base.cpp.o: In function `loop':
C:\Users\derek\Desktop\arduino-1.0.3/LIFA_Base.ino:59: undefined reference to `checkForCommand()'
C:\Users\derek\Desktop\arduino-1.0.3/LIFA_Base.ino:65: undefined reference to `sampleContinously()'
LIFA_Base.cpp.o: In function `setup':
C:\Users\derek\Desktop\arduino-1.0.3/LIFA_Base.ino:39: undefined reference to `syncLV()'
When I go to compile LabVIEWInterface.ino I get a ton of errors as follows:
LabVIEWInterface:95: error: expected constructor, destructor, or type conversion before '*' token
LabVIEWInterface.ino: In function 'int checkForCommand()':
LabVIEWInterface:119: error: 'COMMANDLENGTH' was not declared in this scope
LabVIEWInterface:125: error: 'currentCommand' was not declared in this scope
LabVIEWInterface:127: error: 'currentCommand' was not declared in this scope
LabVIEWInterface:127: error: 'processCommand' was not declared in this scope
LabVIEWInterface.ino: In function 'void processCommand(unsigned char*)':
LabVIEWInterface:140: error: 'checksum_Test' was not declared in this scope
LabVIEWInterface:167: error: 'writeDigitalPort' was not declared in this scope
LabVIEWInterface:210: error: 'analogReadPort' was not declared in this scope
LabVIEWInterface:231: error: 'sevenSegment_Config' was not declared in this scope
LabVIEWInterface:235: error: 'sevenSegment_Write' was not declared in this scope
LabVIEWInterface:306: error: 'spi_setClockDivider' was not declared in this scope
LabVIEWInterface:330: error: 'spi_sendReceive' was not declared in this scope
LabVIEWInterface:341: error: 'servos' was not declared in this scope
LabVIEWInterface:342: error: 'Servo' was not declared in this scope
LabVIEWInterface:342: error: expected primary-expression before ')' token
LabVIEWInterface:342: error: expected `;' before 'malloc'
LabVIEWInterface:420: error: 'lcd_print' was not declared in this scope
LabVIEWInterface:485: error: 'acqMode' was not declared in this scope
LabVIEWInterface:486: error: 'contAcqPin' was not declared in this scope
LabVIEWInterface:487: error: 'contAcqSpeed' was not declared in this scope
LabVIEWInterface:488: error: 'acquisitionPeriod' was not declared in this scope
LabVIEWInterface:489: error: 'iterationsFlt' was not declared in this scope
LabVIEWInterface:490: error: 'iterations' was not declared in this scope
LabVIEWInterface:495: error: 'delayTime' was not declared in this scope
LabVIEWInterface:505: error: 'FIRMWARE_MAJOR' was not declared in this scope
LabVIEWInterface:506: error: 'FIRMWARE_MINOR' was not declared in this scope
LabVIEWInterface:510: error: 'finiteAcquisition' was not declared in this scope
LabVIEWInterface.ino: In function 'void syncLV()':
LabVIEWInterface:752: error: 'DEFAULTBAUDRATE' was not declared in this scope
LabVIEWInterface.ino: In function 'unsigned char checksum_Compute(unsigned char*)':
LabVIEWInterface:763: error: 'COMMANDLENGTH' was not declared in this scope
LabVIEWInterface.ino: In function 'int checksum_Test(unsigned char*)':
LabVIEWInterface:774: error: 'COMMANDLENGTH' was not declared in this scope
LabVIEWInterface.ino: In function 'void sampleContinously()':
LabVIEWInterface:815: error: 'iterations' was not declared in this scope
LabVIEWInterface:817: error: 'contAcqPin' was not declared in this scope
LabVIEWInterface:818: error: 'contAcqSpeed' was not declared in this scope
LabVIEWInterface:821: error: 'delayTime' was not declared in this scope
LabVIEWInterface:827: error: 'delayTime' was not declared in this scope
LabVIEWInterface.ino: In function 'void finiteAcquisition(int, float, int)':
LabVIEWInterface:834: error: 'acquisitionPeriod' was not declared in this scope
Please note that I can compile the example sketches just fine. And I have put all of the includes from the firmware folder from LIFA into the library folder in Arduino 1.0.3.
12-15-2012 06:13 PM
It looks to me like you are trying to compile single files by themselve when you actually need to compile with ALL of the files simultaneously because all of your errors look to be because it can't see those other files. So, make sure that you always keep the files together in a folder called LVIFA_Base.
12-17-2012 08:47 AM
How can you upload the whole thing/instead of one file at a time?
Labview2012/vi.lb/LIFA for arduino/Firmware/LIFA_Base/LIFA_Base/
12-17-2012 01:37 PM
2.2.0.79 tried 78 - same giving me errors
12-17-2012 10:35 PM
Files are not uploaded (in the literal sense). Everything is compiled by the Arduino IDE into a single binary file and that is then uploaded. FYI. Not relevent here.
Well, the first thing that I notice is that you have both .pde files and .ino files (of the same file). You cannot do this because it will try to load both [identical] files. Ironically, your errors don't indicate that this is happening. The second thing that I notice is that you have more than just the one folder in the Firmware folder.
So, my first suggestion would be this (some of this my sound redundant but humor me anyways):
Uninstall your LIFA. Then, browse to "C:\Program Files\National Instruments\LabVIEW 2011\vi.lib\" and delete the "LabVIEW Interface for Arduino" folder (send to recycle bin) to make sure that no files get reused. Now, install LIFA 2.2.0.79. This should have all the correct folders and files (named correctly).
Now, open the Arduino IDE. Go to file, open. Browse to "C:\Program Files\National Instruments\LabVIEW 2011\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base" and open LIFA_Base.ino. This should open all the files in that folder in the Arduino IDE. Click on the check mark to see if it will compile successfully.
Finally, let us know your results after doing all of this.
12-18-2012 08:43 AM
Thx but I have another issue. I tried running the arduino tone example and it gave me erroe 5005 - unable to find arduino. On the iniatialize section, got this error: -1073807343/VISA clear in Labview Interface for Arduino.lvlib:init.vi
12-18-2012 10:13 AM
Also I don't see arduino on MAX but I see it on device manager.