user27914: I have a small L298N module which I would like to use to run a couple of dc motors. The module I have is smaller than most of the ones you see on eBay, it looks like this...

I am trying to use the following library : 
https://github.com/AndreaLombardo/L298N
I have managed to get the motor going forwards and backwards, but the problem is, this module doesn't have a pin for enable ( EN for PWM from the Arduino) and the library seems to require this; therefore I can't control the speed of the motors.
Does anyone have any experience with these modules? Is there a different technique I should be using? Is there another library that works with these kind of modules?
All help appreciated.

user42074: PWM is used to control the duty cycle and not the voltage directly so your PWM will work directly on the input pins of motor driver and you will be able to control the speed.
just use analogWrite on the input pin which was held HIGH and HOLD the other pin to LOW. If you desire to change the direction while simultaneously controlling the speed. just analogWrite both the pins. Just keep in mind that the duty cycle of both the pins should not be tweaked simultaneously. while the speed is being controlled in one direction the other pin should be at analogWrite(other,0).

27914: <p>I have a small L298N module which I would like to use to run a couple of dc motors. The module I have is smaller than most of the ones you see on eBay, it looks like this...
<a href="https://i.stack.imgur.com/Kv59O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kv59O.jpg" alt="enter image description here"></a>
I am trying to use the following library : 
<a href="https://github.com/AndreaLombardo/L298N" rel="nofollow noreferrer">https://github.com/AndreaLombardo/L298N</a></p>

<p>I have managed to get the motor going forwards and backwards, but the problem is, this module doesn't have a pin for enable ( EN for PWM from the Arduino) and the library seems to require this; therefore I can't control the speed of the motors.</p>

<p>Does anyone have any experience with these modules? Is there a different technique I should be using? Is there another library that works with these kind of modules?</p>

<p>All help appreciated.</p>
 42074: <p>PWM is used to control the duty cycle and not the voltage directly so your PWM will work directly on the input pins of motor driver and you will be able to control the speed.
just use analogWrite on the input pin which was held HIGH and HOLD the other pin to LOW. If you desire to change the direction while simultaneously controlling the speed. just analogWrite both the pins. Just keep in mind that the duty cycle of both the pins should not be tweaked simultaneously. while the speed is being controlled in one direction the other pin should be at analogWrite(other,0).</p>
