12-04-2014 08:22 AM
Hi all,
Having trouble installing the firmware to use LIFA. I'm using an Arduino Meg 2560 board with IDE 1.05 and LabView 2012. I have my arduino set to COM7 and I've selected the correct board.
Whenever I try to install either the LIFA_base codoe I get these errors:
LIFA_Base.cpp.o: In function `loop':
C:\Program Files (x86)\Arduino/LIFA_Base.ino:59: undefined reference to `checkForCommand()'
C:\Program Files (x86)\Arduino/LIFA_Base.ino:65: undefined reference to `sampleContinously()'
LIFA_Base.cpp.o: In function `setup':
C:\Program Files (x86)\Arduino/LIFA_Base.ino:39: undefined reference to `syncLV()'
If I try to install the LabVIEWinterface file I get these errors:
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
Can anyone help?
Cheers
12-04-2014 08:50 AM
Hi,
Is your bud rate set to 9600?? I think mega boards must have bud rate set to 9600.
Barddya
12-04-2014 09:28 AM
Hi,
Yup the BAUD is set to 9600.
12-04-2014 06:56 PM
It looks like to me that not all the files were correctly open in the Arduino IDE when you tried to compile it. Make sure that you open the IDE first then go to "File > Open" and select "LIFA_Base.ino" from the "firmware/LIFA_Base" folder. That should open all the necessary files.
12-05-2014 07:42 AM
I thought this may be the case to but it appears not. I've reinstalled the LIFA interface throguh the JKI VI package. I was wondering if maybe because I'm using LabVIEW 2012 that theres some incompatibility?
12-05-2014 06:29 PM
Re-installing LIFA won't affect the issue that I've stated. It is how the Arduino IDE opens the files. When you open the LIFA_Base.ino file from within the Arduino IDE, you should see all of the files in the the LIFA_Base folder open in tabs in the Arduino IDE.
LIFA will work on any version from 2009 to the present.
12-09-2014 10:25 AM
Hey when I open up the LIFA_Base, all of the required tabs will open up. I have no idea what else I can do because on paper I cannot see what I am doing wrong.