SN754410 Quadruple Half-H Driver

Used Products:

1. Arduino UNO
2. SN754410NE

Code:

#define motor1APin 2 #define motor1BPin 3 #define motor2APin 6 #define motor2BPin 7 void setup() { pinMode(motor1APin, OUTPUT); pinMode(motor1BPin, OUTPUT); pinMode(motor2APin, OUTPUT); pinMode(motor2BPin, OUTPUT); } void loop() { digitalWrite(motor1APin, 1); digitalWrite(motor1BPin, 0); digitalWrite(motor2APin, 1); digitalWrite(motor2BPin, 0); delay(2000); digitalWrite(motor1APin, 0); digitalWrite(motor1BPin, 1); digitalWrite(motor2APin, 0); digitalWrite(motor2BPin, 1); delay(2000); }