LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Adafruit Motor Shield Driver Problems

I need help,  I just bought the Adafruit motor shield v2 and im trying to figure out how to get the drivers on the arduino uno card so i can use it.  i read the discussion called Adafruit motor shield stepper drive however it assumes that the firmware has already been flashed on for the motor shield.

this is adafruits info they give:

https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/install-software

However when i do this there is an error in complieing.

ill post the the error i get. 

Im a little lost, can anyone help

0 Kudos
Message 1 of 39
(13,102 Views)

The version 2 Adafruit Motor Shield uses different pins and a different method to connect to an Arduino board than the original Adafruit Motor Shield.  The version 2 Adafruit Motor Shield is not compatible with the present version of LIFA.  Because LIFA is being replaced by LINX it is doubtful if you will anybody who is willing to update LIFA for use with the version 2 Adafruit's Motor Shield.

Hence I suggest you modify the version 2 DC Motor Test sketch for use with Labview and use Labview to send speed and direction commands to the Arduino board.

hrh1818.  

0 Kudos
Message 2 of 39
(4,706 Views)

ok how do i do that?

0 Kudos
Message 3 of 39
(4,706 Views)

my plan was to use labview to control the speed not the arduino software itself.  with that being said do i really need to update anything or is there a way for me to specify which pins on the motor sheild i want to use, or can i not access the pins without updating the firmware on the arduino first.  for example does the motor shield use the same 0-13 digital pins or do they introduce pin 14 or something...

0 Kudos
Message 4 of 39
(4,706 Views)

Here is what adafruit say.

"Instead of using a latch and the Arduino's PWM pins, we have a fully-dedicated PWM driver chiponboard. This chip handles all the motor and speed controls over I2C. Only two pins (SDA & SCL) are required to drive the multiple motors, and since it's I2C you can also connect any other I2C devices or shields to the same pins. This also makes it drop-in compatible with any Arduino, such as the Uno, Due, Leonardo and Mega R3. "

AdaFruit's DC Motor Test sketch hides the complexity of using I2C.  Hence you could try an alternate approach and use LIFA to access the I2C pins instead of using Adafruits DC Motor Test sketch approach for driving your DC motor.

hrh1818

0 Kudos
Message 5 of 39
(4,706 Views)

ok so i understand that the motor shield using its own chip to handle the PWM instead of taking up the pins on the UNO.  However, what im not getting is what do i modify on the LIFA.  When i set up the Uno originally without the motor shield i simply used the LVIFA_Base_2.1.1.69 as described in setting up your arduino.  When i try to complie my LIFA itself it does not complie.  My arduino comminicates with labview fine so when i put the motor shield on it, is there a way i can just access PWM chip on it through the original set up of the arduino currently?

0 Kudos
Message 6 of 39
(4,706 Views)

because my goal is to not use the arduino code examples and just use labview.  I dont know C++ coding so modifying the code will be difficult and the UNO communicates with labview as is but im adding the motor shield onto it so i know accessing the new ports will be different, but i dont know how to do this soly in labview or if its even possible.

0 Kudos
Message 7 of 39
(4,706 Views)

How does this "When i try to compile my LIFA itself it does not compile." differ from when you said "When i set up the Uno originally without the motor shield i simply used the LVIFA_Base_2.1.1.69 as described in setting up your arduino"? 

You said "is there a way i can just access PWM chip on it through the original set up of the arduino currently?

Yes exactly as I  described in my previous message.  User the I2C capability built into LIFA to access the PWM chip.

hrh1818

0 Kudos
Message 8 of 39
(4,706 Views)

The firmware that is currently on the arduino is LVIFA not LIFA.  i do not know what the difference is however when i set up the card this is the steps that i was instructed to use.  I can not modify the LIFA because it would not complie and upload on the the card,  However the LVIFA did complie and unpload.  So in your message you told me to modify the LIFA which i cannot due as it does not complie.  I can modify the LVIFA i would just need to know what to modify bcause i do not know what i am supposed to change.  And as i have asked, when i create my labview VI. what pins would i use for the motor control since the motor shieild has its own pins.

0 Kudos
Message 9 of 39
(4,706 Views)

IIRC, the latest verison of the LabVIEW Interface for Arduino firmware has not been called LVIFA, it is called LIFA (LIFA_Base.ino).  Maybe you are using an old version of the firmware?

Regardless, if you are able to use I2C like hrh1818 suggestions, you should upgrade to LINX.

0 Kudos
Message 10 of 39
(4,706 Views)