Stacking Dual VNH5019 with AdaFruit Motor Shield v2.3

I am currently working on a design project and I am stacking the Dual VNH5019 motor shield with 2 Adafruit Motor Shields v2.3 on top of an Arduino Mega 2560. I tried running the demo code to get a sense of what the coding is doing to the motors and nothing happened. I am powering the Dual VNH5019 motor shield with a 11.1v 2200mah 3s lipo battery, so there is plenty of power and current. The motors i am trying to run are Traxxas Titan 380. Is there something that I am missing in the code or what do I need to do to get the motors going?

Hello.

I am sorry you are having trouble getting your VNH5019 shield to work. It sounds like you stacked all three of your shields and are now trying to control your Traxxas motors from your VNH5019. In general, connecting all parts of your system together and expecting everything to work correctly on the first try is not a good approach to electronics. You should test each sub-system individually, and gradually integrate working components to build your system. Let’s start troubleshooting by removing everything except for your Arduino Mega and VNH5019 shield. Can you connect your 3S battery to VIN on the VNH5019 shield and control your Traxxas motors by running our “Demo.ino” example sketch? If that does not work, can you post pictures that clearly show how you have everything connected? Also, what is the stall current of your motors? (If you do not have that, can you provide a link to a datasheet for them?)

-Jon

I got the motor shield to run the traxxas motors with the demo. I had a bad solder joint for one of the terminals. Is there a better way to code the arduino to run the traxxas motors, i.e., run the motors to a set speed and maintain it for “x” amount of time and then change speed? Such as defining a variable, like “FAST_SPEED” equals 400 and “CREASE_SPEED” as 25.

Yes, you can write your own custom sketch that sets certain speeds and adds specific delays using variables that you define.
In general, it sounds like you are new to Arduino programming. The Arduino playground is a good place to get started learning how to write Arduino code. In particular, if you want to focus on learning how to add delays, you could begin by reviewing the Arduino reference page for its delay() function.

Additionally, if you try writing your own code and are not getting the behavior that you want, you could try posting the simplest version of your code that shows the issue, and I’d be happy to take a look.

-Jon