06-22-2014 08:18 PM
guys, you have to really help me out on this one i have been at it for days. i am new to this so please help me out. i have an arduino uno with atmega8 on it and i m trying to interface it with labview but everytime i tried to upload the lvifa base file it shows and error, and it reads "XYZ is not declared in this scope".
AFMotor.cpp: In function 'void initPWM1(uint8_t)':
AFMotor.cpp:87: error: 'TCCR2A' was not declared in this scope
AFMotor.cpp:87: error: 'COM2A1' was not declared in this scope
AFMotor.cpp:88: error: 'TCCR2B' was not declared in this scope
AFMotor.cpp:89: error: 'OCR2A' was not declared in this scope
AFMotor.cpp: In function 'void setPWM1(uint8_t)':
AFMotor.cpp:108: error: 'OCR2A' was not declared in this scope
AFMotor.cpp: In function 'void initPWM2(uint8_t)':
AFMotor.cpp:124: error: 'TCCR2A' was not declared in this scope
AFMotor.cpp:124: error: 'COM2B1' was not declared in this scope
AFMotor.cpp:125: error: 'TCCR2B' was not declared in this scope
AFMotor.cpp:126: error: 'OCR2B' was not declared in this scope
AFMotor.cpp: In function 'void setPWM2(uint8_t)':
AFMotor.cpp:146: error: 'OCR2B' was not declared in this scope
AFMotor.cpp: In function 'void initPWM3(uint8_t)':
AFMotor.cpp:162: error: 'TCCR0A' was not declared in this scope
AFMotor.cpp:162: error: 'COM0A1' was not declared in this scope
AFMotor.cpp:162: error: 'WGM00' was not declared in this scope
AFMotor.cpp:162: error: 'WGM01' was not declared in this scope
AFMotor.cpp:164: error: 'OCR0A' was not declared in this scope
AFMotor.cpp: In function 'void setPWM3(uint8_t)':
AFMotor.cpp:184: error: 'OCR0A' was not declared in this scope
AFMotor.cpp: In function 'void initPWM4(uint8_t)':
AFMotor.cpp:202: error: 'TCCR0A' was not declared in this scope
AFMotor.cpp:202: error: 'COM0B1' was not declared in this scope
AFMotor.cpp:202: error: 'WGM00' was not declared in this scope
AFMotor.cpp:202: error: 'WGM01' was not declared in this scope
AFMotor.cpp:204: error: 'OCR0B' was not declared in this scope
AFMotor.cpp: In function 'void setPWM4(uint8_t)':
AFMotor.cpp:224: error: 'OCR0B' was not declared in this scope
I tried different arduino IDE versions as well, it not working out.
Thanks!
Solved! Go to Solution.
06-22-2014 08:24 PM
Because LIFA is no longer officially supported, I recommend that you use LINX (the successor to LIFA). It no longer requires you to compile any Arduino code by using the Firmware Wizard.
Check out the official announcement: LIFA Replacement - LINX Officially Released
06-22-2014 09:57 PM
but what does that have to do with it not uploading into my arduino, and i have labview 2009 it does not support linx
06-22-2014 10:10 PM
Ok. Well, the first thing to check is to make sure that you have the most updated version of LIFA (I ask this because you mention LVIFA which is the old acronym for the interface). So, make sure you have the latest version installed by looking at VIPM.
When you have the latest version, the Arduino file that you need to open is called LIFA_Base.ino (LIFA_Base is also the name of the foler).
Another thing to check is the version of the Arduino IDE that you are using. IIRC, you should only be using 1.0.x (I have version 1.0.5).
So, if you need to make changes based on the above, try to compile again and report back. You should also look at all the other threads that have had this same issue and follow the advice given there.
06-22-2014 10:38 PM
I did try out arduino ide 1.0.5, and i did download the latest verion that is 2.2.79, but the same scope error message comes, what are the possible reson for such errors?
06-22-2014 11:01 PM
e: Adafruit Motor Shield Driver Problems
The LIFA_Base folder should contain the following 12 files.
LIFA_Base an .ino file
LabviewInterface an .ino file
AccelStepper a c++ file
AFMotor a C++ file
IRremote a C++ file
AcelStepper a Header file
AFMotor a Header file
IRremote a header file
IRremoteint a header file
LabbviewInterface a Header file
IRremoteLicense a Text file
Keywords a Test file
Your error message indicates you missing either the AFMotor C++ file or the AFMotor header file or both AFMotor files. Try reinstalling the LIFA and make sure when you compile the firmware you are compiling version 2.2.0.79.
06-22-2014 11:18 PM
yes, i do have all the files you listed, i tried reinstalling LIFA many times each time with a different version. Its still same error message popping up.
06-22-2014 11:26 PM
i do have all the files you listed above.
06-23-2014 12:28 AM
It would also be very helpful if anyone could share their LIFA_base folder just incase mine has not downloaded files properly.
Thanks!
06-23-2014 01:05 AM
Also is it possible that there is something wrong with my board?