Arduino motor shield r3

I mounted my motor shield on my arduino 101 and connected the power (9 volt, 6aa cells) and two motors. I began playing with programming the arduino/motor shield but upon connection via USB cable the motors start turning at random before the program begins execution. After maybe five seconds of the motor shield doing it’s own thing, my program kicks in. Is there a way to keep this from happening?

Hi,

There is a “Vin Connect” jumper on the bottom of theArduino Motor Shield Rev3 which connects the motor’s power input to the Arduino Vin pin.
On the Arduino website, it is indicated that :

Connecting the USB to the Arduino Board while the Vin jumper is connected might provide a 5V on the power line of the motors.
You can try to cut the “Vin Connect” jumper.