Skip to content

Adruino/Wiring Library for controlling two motors using the Adafruit Motor Shield.

License

Notifications You must be signed in to change notification settings

kristopher/DualMotorController

Repository files navigation

Dual Motor Controller

Adruino/Wiring Library for controlling two motors using the Adafruit Motor Shield.

Example


#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);
}

Install


  cd your_arduino_folder/hardware/libraries/

  git clone git://github.com/kristopher/DualMotorController.git

Dependencies

Adafruit Motor Shield

Adafruit DC Motor library

Homepage

http://github.com/kristopher/DualMotorController

About

Adruino/Wiring Library for controlling two motors using the Adafruit Motor Shield.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages