Adruino/Wiring Library for controlling two motors using the Adafruit Motor Shield.
#include <AFMotor.h>
#include <DualMotorController.h>
AF_DCMotor left_motor(2);
AF_DCMotor right_motor(1);
DualMotorController tank(&left_motor, &right_motor);
void setup() {
}
void loop() {
tank.setSpeed(255);
tank.forward();
tank.straight();
delay(1000);
tank.left();
delay(100);
tank.right();
delay(100);
tank.reverse();
tank.straight();
delay(1000);
tank.stop();
delay(1000);
}
cd your_arduino_folder/hardware/libraries/
git clone git://github.com/kristopher/DualMotorController.git