LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error compiling LIFA

HELLO,

I,am trying to load the LIFA into my arduino uno R3 and I always get the sme error from the IDE:

Arduino: 1.6.6 Hourly Build 2015/10/01 05:42 (Windows 7), Board: "Arduino/Genuino Uno"

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:33: error: redefinition of 'unsigned char currentCommand [15]'

unsigned char currentCommand[COMMANDLENGTH];    // The Current Command For The Arduino To Process

                                           ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:33: error: 'unsigned char currentCommand [15]' previously declared here

unsigned char currentCommand[COMMANDLENGTH];    // The Current Command For The Arduino To Process

               ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:35: error: redefinition of 'unsigned char acqMode'

unsigned char acqMode;

               ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:35: error: 'unsigned char acqMode' previously declared here

unsigned char acqMode;

               ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:36: error: redefinition of 'unsigned char contAcqPin'

unsigned char contAcqPin;

               ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:36: error: 'unsigned char contAcqPin' previously declared here

unsigned char contAcqPin;

               ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:37: error: redefinition of 'float contAcqSpeed'

float contAcqSpeed;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:37: error: 'float contAcqSpeed' previously declared here

float contAcqSpeed;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:38: error: redefinition of 'float acquisitionPeriod'

float acquisitionPeriod;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:38: error: 'float acquisitionPeriod' previously declared here

float acquisitionPeriod;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:39: error: redefinition of 'float iterationsFlt'

float iterationsFlt;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:39: error: 'float iterationsFlt' previously declared here

float iterationsFlt;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:40: error: redefinition of 'int iterations'

int iterations;

     ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:40: error: 'int iterations' previously declared here

int iterations;

     ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.ino:26:0:

LabVIEWInterface.h:41: error: redefinition of 'float delayTime'

float delayTime;

       ^

In file included from C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LVIFA_Base.pde:26:0:

LabVIEWInterface.h:41: error: 'float delayTime' previously declared here

float delayTime;

       ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.ino: In function 'void processCommand(unsigned char*)':

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.ino:138:60: warning: left shift count >= width of type [enabled by default]

       duration=(command[8]+  (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));  

                                                            ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.ino:138:77: warning: left shift count >= width of type [enabled by default]

       duration=(command[8]+  (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));  

                                                                             ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: At global scope:

LabVIEWInterface:29: error: redefinition of 'AF_Stepper motor1'

   AF_Stepper motor1(200, 1);

                    ^

LabVIEWInterface:29: error: 'AF_Stepper motor1' previously declared here

   AF_Stepper motor1(200, 1);

              ^

LabVIEWInterface:30: error: redefinition of 'AF_Stepper motor2'

   AF_Stepper motor2(200, 2);

                    ^

LabVIEWInterface:30: error: 'AF_Stepper motor2' previously declared here

   AF_Stepper motor2(200, 2);

              ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void forwardstep1()':

LabVIEWInterface:34: error: redefinition of 'void forwardstep1()'

   void forwardstep1() { 

        ^

LabVIEWInterface:34: error: 'void forwardstep1()' previously defined here

   void forwardstep1() { 

        ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void backwardstep1()':

LabVIEWInterface:37: error: redefinition of 'void backwardstep1()'

   void backwardstep1() { 

        ^

LabVIEWInterface:37: error: 'void backwardstep1()' previously defined here

   void backwardstep1() { 

        ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void forwardstep2()':

LabVIEWInterface:41: error: redefinition of 'void forwardstep2()'

   void forwardstep2() { 

        ^

LabVIEWInterface:41: error: 'void forwardstep2()' previously defined here

   void forwardstep2() { 

        ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void backwardstep2()':

LabVIEWInterface:44: error: redefinition of 'void backwardstep2()'

   void backwardstep2() { 

        ^

LabVIEWInterface:44: error: 'void backwardstep2()' previously defined here

   void backwardstep2() { 

        ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: At global scope:

LabVIEWInterface:48: error: redefinition of 'AccelStepper steppers [8]'

   AccelStepper steppers[8];  //Create array of 8 stepper objects

                          ^

LabVIEWInterface:48: error: 'AccelStepper steppers [8]' previously declared here

   AccelStepper steppers[8];  //Create array of 8 stepper objects

                ^

LabVIEWInterface:54: error: redefinition of 'unsigned int retVal'

unsigned int retVal;

              ^

LabVIEWInterface:54: error: 'unsigned int retVal' previously declared here

unsigned int retVal;

              ^

LabVIEWInterface:55: error: redefinition of 'int sevenSegmentPins [8]'

int sevenSegmentPins[8];

                       ^

LabVIEWInterface:55: error: 'int sevenSegmentPins [8]' previously declared here

int sevenSegmentPins[8];

     ^

LabVIEWInterface:56: error: redefinition of 'int currentMode'

int currentMode;

     ^

LabVIEWInterface:56: error: 'int currentMode' previously declared here

int currentMode;

     ^

LabVIEWInterface:57: error: redefinition of 'unsigned int freq'

unsigned int freq;

              ^

LabVIEWInterface:57: error: 'unsigned int freq' previously declared here

unsigned int freq;

              ^

LabVIEWInterface:58: error: redefinition of 'long unsigned int duration'

unsigned long duration;

               ^

LabVIEWInterface:58: error: 'long unsigned int duration' previously declared here

unsigned long duration;

               ^

LabVIEWInterface:59: error: redefinition of 'int i2cReadTimeouts'

int i2cReadTimeouts = 0;

     ^

LabVIEWInterface:59: error: 'int i2cReadTimeouts' previously defined here

int i2cReadTimeouts = 0;

     ^

LabVIEWInterface:60: error: redefinition of 'char spiBytesToSend'

char spiBytesToSend = 0;

      ^

LabVIEWInterface:60: error: 'char spiBytesToSend' previously defined here

char spiBytesToSend = 0;

      ^

LabVIEWInterface:61: error: redefinition of 'char spiBytesSent'

char spiBytesSent = 0;

      ^

LabVIEWInterface:61: error: 'char spiBytesSent' previously defined here

char spiBytesSent = 0;

      ^

LabVIEWInterface:62: error: redefinition of 'char spiCSPin'

char spiCSPin = 0;

      ^

LabVIEWInterface:62: error: 'char spiCSPin' previously defined here

char spiCSPin = 0;

      ^

LabVIEWInterface:63: error: redefinition of 'char spiWordSize'

char spiWordSize = 0;

      ^

LabVIEWInterface:63: error: 'char spiWordSize' previously defined here

char spiWordSize = 0;

      ^

LabVIEWInterface:64: error: redefinition of 'Servo* servos'

Servo *servos;

        ^

LabVIEWInterface:64: error: 'Servo* servos' previously declared here

Servo *servos;

        ^

LabVIEWInterface:65: error: redefinition of 'byte customChar [8]'

byte customChar[8];

                  ^

LabVIEWInterface:65: error: 'byte customChar [8]' previously declared here

byte customChar[8];

      ^

LabVIEWInterface:66: error: redefinition of 'LiquidCrystal lcd'

LiquidCrystal lcd(0,0,0,0,0,0,0);

                  ^

LabVIEWInterface:66: error: 'LiquidCrystal lcd' previously declared here

LiquidCrystal lcd(0,0,0,0,0,0,0);

               ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void setMode(int)':

LabVIEWInterface:68: error: redefinition of 'void setMode(int)'

void setMode(int mode)

      ^

LabVIEWInterface:68: error: 'void setMode(int)' previously defined here

void setMode(int mode)

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'int checkForCommand()':

LabVIEWInterface:74: error: redefinition of 'int checkForCommand()'

int checkForCommand(void)

     ^

LabVIEWInterface:74: error: 'int checkForCommand()' previously defined here

int checkForCommand(void)

     ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void processCommand(unsigned char*)':

LabVIEWInterface:103: error: redefinition of 'void processCommand(unsigned char*)'

void processCommand(unsigned char command[])

      ^

LabVIEWInterface:103: error: 'void processCommand(unsigned char*)' previously defined here

void processCommand(unsigned char command[])

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde:138:60: warning: left shift count >= width of type [enabled by default]

       duration=(command[8]+  (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));  

                                                            ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde:138:77: warning: left shift count >= width of type [enabled by default]

       duration=(command[8]+  (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));  

                                                                             ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void writeDigitalPort(unsigned char*)':

LabVIEWInterface:541: error: redefinition of 'void writeDigitalPort(unsigned char*)'

void writeDigitalPort(unsigned char command[])

      ^

LabVIEWInterface:540: error: 'void writeDigitalPort(unsigned char*)' previously defined here

void writeDigitalPort(unsigned char command[])

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void analogReadPort()':

LabVIEWInterface:560: error: redefinition of 'void analogReadPort()'

void analogReadPort()

      ^

LabVIEWInterface:559: error: 'void analogReadPort()' previously defined here

void analogReadPort()

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void sevenSegment_Config(unsigned char*)':

LabVIEWInterface:592: error: redefinition of 'void sevenSegment_Config(unsigned char*)'

void sevenSegment_Config(unsigned char command[])

      ^

LabVIEWInterface:591: error: 'void sevenSegment_Config(unsigned char*)' previously defined here

void sevenSegment_Config(unsigned char command[])

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void sevenSegment_Write(unsigned char*)':

LabVIEWInterface:603: error: redefinition of 'void sevenSegment_Write(unsigned char*)'

void sevenSegment_Write(unsigned char command[])

      ^

LabVIEWInterface:602: error: 'void sevenSegment_Write(unsigned char*)' previously defined here

void sevenSegment_Write(unsigned char command[])

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void spi_setClockDivider(unsigned char)':

LabVIEWInterface:612: error: redefinition of 'void spi_setClockDivider(unsigned char)'

void spi_setClockDivider(unsigned char divider)

      ^

LabVIEWInterface:611: error: 'void spi_setClockDivider(unsigned char)' previously defined here

void spi_setClockDivider(unsigned char divider)

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void spi_sendReceive(unsigned char*)':

LabVIEWInterface:643: error: redefinition of 'void spi_sendReceive(unsigned char*)'

void spi_sendReceive(unsigned char command[])

      ^

LabVIEWInterface:642: error: 'void spi_sendReceive(unsigned char*)' previously defined here

void spi_sendReceive(unsigned char command[])

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void syncLV()':

LabVIEWInterface:694: error: redefinition of 'void syncLV()'

void syncLV()

      ^

LabVIEWInterface:693: error: 'void syncLV()' previously defined here

void syncLV()

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'unsigned char checksum_Compute(unsigned char*)':

LabVIEWInterface:704: error: redefinition of 'unsigned char checksum_Compute(unsigned char*)'

unsigned char checksum_Compute(unsigned char command[])

               ^

LabVIEWInterface:703: error: 'unsigned char checksum_Compute(unsigned char*)' previously defined here

unsigned char checksum_Compute(unsigned char command[])

               ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'int checksum_Test(unsigned char*)':

LabVIEWInterface:715: error: redefinition of 'int checksum_Test(unsigned char*)'

int checksum_Test(unsigned char command[])

     ^

LabVIEWInterface:714: error: 'int checksum_Test(unsigned char*)' previously defined here

int checksum_Test(unsigned char command[])

     ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void AccelStepper_Write(unsigned char*)':

LabVIEWInterface:730: error: redefinition of 'void AccelStepper_Write(unsigned char*)'

   void AccelStepper_Write(unsigned char command[]){

        ^

LabVIEWInterface:729: error: 'void AccelStepper_Write(unsigned char*)' previously defined here

   void AccelStepper_Write(unsigned char command[]){

        ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void sampleContinously()':

LabVIEWInterface:756: error: redefinition of 'void sampleContinously()'

void sampleContinously()

      ^

LabVIEWInterface:755: error: 'void sampleContinously()' previously defined here

void sampleContinously()

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void finiteAcquisition(int, float, int)':

LabVIEWInterface:775: error: redefinition of 'void finiteAcquisition(int, float, int)'

void finiteAcquisition(int analogPin, float acquisitionSpeed, int numberOfSamples)

      ^

LabVIEWInterface:774: error: 'void finiteAcquisition(int, float, int)' previously defined here

void finiteAcquisition(int analogPin, float acquisitionSpeed, int numberOfSamples)

      ^

C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LVIFA_Base\LabVIEWInterface.pde: In function 'void lcd_print(unsigned char*)':

LabVIEWInterface:798: error: redefinition of 'void lcd_print(unsigned char*)'

void lcd_print(unsigned char command[])

      ^

LabVIEWInterface:797: error: 'void lcd_print(unsigned char*)' previously defined here

void lcd_print(unsigned char command[])

      ^

exit status 1

redefinition of 'unsigned char currentCommand [15]'

  This report would have more information with

  "Show verbose output during compilation"

  enabled in File > Preferences.

PLEASE help me fix it because it is driving me crazy...

0 Kudos
Message 1 of 7
(8,385 Views)

LIFA was developed with an older version of the Arduino IDE.  You need to use either version 1.0.6 or older or use LINX.

hrh212

0 Kudos
Message 2 of 7
(6,266 Views)

I used the 1.0.6 version and it gave me the same error!

HELP

0 Kudos
Message 3 of 7
(6,266 Views)

Have you tried LINX?  http://www.labviewmakerhub.com/linx

0 Kudos
Message 4 of 7
(6,266 Views)

When I try to compile LIFA_Base now with an older version of the Arduiino IDE I get errors.  Whereas last spring I successfully compiled LIFA_Base.  I will need more time  to find the bug ro be able to answer your question

hrh212

0 Kudos
Message 5 of 7
(6,266 Views)

The problem is solved, it turned out that there were two additional files with extension .ino in the firmware, when I deleted them the firmware uploaded just fine with no error. Thank you for your help I can now begin my projects

0 Kudos
Message 6 of 7
(6,266 Views)

Were you able to solve it?

0 Kudos
Message 7 of 7
(3,802 Views)