Control Motors Independently Using Two Pololu Dual VNH5019 motor shields (Omni directional wheels)

I am currently using two Pololu Dual VNH5019 motor shields stacked ontop of each other for my robot. Since it is like this if motor 1 spins clockwise motor 3 automatically spins the same way even if motor 3 isn’t turned on in the program. This would be okay for regular wheels, but I am using omni-directional wheels. I need motors 1 and 3 to spin opposite directions as well as have motors 2 and 4 spin opposite directions. As of now, 2 and 4 can only spin one way at a time, and 3 and 4 can only spin one way at a time. How would I go about making it so I can make 1 and 3 spin opposite directions as well as have motors 2 and 4 spin opposite directions?

Hello.

If you have not remapped the pins controlling the driver, stacking two shields on top of each other will cause the outputs of those drivers to be identical since they are being controlled by the same pins and therefore receiving the same signals. If you intended this to be the case and just need one of your motors to spin in the opposite direction as it is currently, you can probably just swap the motor leads of that motor. However, if you need independent control of all 4 motors, you will need to remap the pins on one of your shields and account for the change in your code. You can find more information about this in the “Remapping the Arduino Connections” section of the Dual VNH5019 Motor Driver Shield User’s Guide.

Brandon