![background image](http://html1.mh-extra.com/html/steren/ard-020/ard-020_instruction-manual_1373800058.webp)
26
26
The “enable” (1, 9) pins support as input a PWM signal and it are used to control
the speed of the motors using pulse width modulation technique.
The motors are connected between pins 3, 6, 11 or 14. The Vss voltage is to feed
or give power to the motor.
Basic installation: Simple Control of an motor with the L293 CI at constant
speed
First we will just show the speed of a DC motor control through the L293D
integrated. So we set the direction control PIN to 5v and 0v, in such a way that
it will only turn in one direction. If we want to change direction, it will only be
necessary to change the polarization.
Program
Simple control of an motor with the L293 CI at constant speed
int motorpin = 10;
// Output analog PWM PIN
void setup(){}
void loop() {
analogWrite(motorpin, 125);
// activates the motor at a constant speed
delay (100);
// wait 100 ms for the next reading
}