These modules have an
interesting control scheme, which is explained
in this article much more clearly than I have seen anywhere else.
There are four inputs to the module:
□ LPWM
□ RPWM
□ LEnable
□ REnable
The left and right refer to the left and right half bridges.
To start, connect the Enable pins together. As the module is wired, I can't see any reason you would enable one side but not the other. If Enable is low, the half bridge outputs are disconnected. The other inputs don't matter and do nothing. If Enable is high, the other inputs come into play.
When the PWM input is high, the bridge output is connected to V+. When it's low, the bridge output is low. If both PWM inputs are the same, both sides of the motor are connected together, either to V+ or to ground. This results in motor braking (not breaking) and will provide rapid slowing and holding the motor rotor in position. You can test this with a small permanent magnet motor – compare the effort required to turn the motor with the leads open vs shorted.
If one of the PWM inputs is high, and the other low, the motor runs at full speed (direction depends on the motor and how it's connected). Reverse the the high and low inputs to the motor and it will be full speed un the opposite direction.
To vary the speed of the motor, make one of PWM inputs low and PWM the other. Swap these to turn the other direction at the same speed.
If instead, you switch the low input to high, the motor will turn in the opposite direction at 100% – PWM_Duty_Cycle speed. For example, if the motor is turning at 10% of speed clockwise with the input low, it will be turning at 90% of speed in the other direction when the low input is made high.
The link in the first post has an Arduino sketch to use a pot to vary the direction and speed. When the pot is at mid span, the motor is stopped. Moving it from there results in rotation one way or the other, at faster speed the further the pot is turned. Ummm....be sure to use a
linear pot if you try this.