I use two electrical motors powered by a 7,2V racing accumulator pack. To control the direction of and power to the motors, I use two Allegro UND2916B motor drivers in parallel, one soldered on top of the other. See the image below for the complete circuit layout.
Unfortunately, there is an error in the schema. To correct it, the Arduino Nano connections should be shifted one step down, so D8 connects to D7 instead, D7 to D6, and so on.
I do not use the PWM capabilities in the 2916. Instead I use the PWM outputs on the Arduino.
In the Arduino Development Environment, I define the meaning of the different signals.
byte leftDirectionPin = 7;
byte leftSpeedPin = 6;
byte rightSpeedPin = 5;
byte rightDirectionPin = 4;