Includes 4 H-Bridges using L293D chipset. Provides 0.6A per bridge (1.2A peak) with thermal shutdown protection, internal kickback protection diodes. Can run motors on 4.5VDC to 36VDC. Individual 8-bit speed selection.
Supposedly about a 1.2V drop across the L293D H-bridge.
Hooked up to a toy RC truck with two motors. One motor controls the steering (left/right) and the other is the drive motor (forward/reverse). This example simply has the truck drive forward-right and then reverse-left.
Video: Arduino Motor Shield on Vimeo
#include <AFMotor.h>
AF_DCMotor drive(2, MOTOR12_1KHZ); // create motor #2, forward/reverse
AF_DCMotor steer(1, MOTOR12_1KHZ); // create motor #2, left/right
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
drive.setSpeed(200); // set the speed to 200/255
steer.setSpeed(200); // set the speed to 200/255
}
void loop() {
Serial.println("STEER RIGHT, DRIVE FORWARD");
steer.run(FORWARD);
drive.run(FORWARD);
delay(1000);
Serial.println("RELEASE / STOP");
drive.run(RELEASE);
steer.run(RELEASE);
delay(5000);
Serial.print("STEER LEFT, DRIVE BACKWARD");
steer.run(BACKWARD);
drive.run(BACKWARD);
delay(1000);
Serial.print("RELEASE / STOP");
drive.run(RELEASE);
steer.run(RELEASE);
delay(5000);
}