I am controlling small DC motor using L293D IC
I followed the connection given in the diagram below,
and I used 9 volts battery for the motor voltage.
However the motor did not work.
I replaced the IC three times, to make sure it's not faulty
http://forum.arduino.cc/index.php?topic=133833.0
#define EN_PIN 9
#define A1_PIN 3
#define A2_PIN 4
void setup() {
// put your setup code here, to run once:
pinMode(EN_PIN, OUTPUT);
pinMode(A1_PIN, OUTPUT);
pinMode(A2_PIN, OUTPUT);
digitalWrite(EN_PIN, HIGH);
}
void loop() {
analogWrite(EN_PIN, 200);
digitalWrite(A1_PIN, LOW);
digitalWrite(A2_PIN, HIGH);
delay(5000);
digitalWrite(A1_PIN, HIGH);
digitalWrite(A2_PIN, LOW);
}
