Applying "Example" Code to other example codes, Merrr!

I am glad that you were able to implement a button control feature into your code; thanks for letting us know.

In the DualVNH5019MotorShield library’s Demo example, the values that are iterated in the for loops represent the PWM duty cycle, where the value 400 is the maximum duty cycle (100%) and corresponds to the motor receiving the full motor supply voltage. The value -400 would be 100% duty cycle in the opposite direction, and 0 would be 0% duty cycle. Each for loop in main() ramps the speed up or down for each motor channel by varying the PWM duty cycle.

By the way, if you do not already know, the DualVNH5019MotorShield Arduino library contains brake functions: setM1Brake, setM2Brake, and setBrakes. You can see the definition for those functions in DualVNH5019MotorShield.cpp on the DualVNH5019MotorShield library’s GitHub page. Also, you might find it helpful to read this post about how the brake functions work in the DualVNH5019MotorShield library.

- Amanda