#include <AFMotor.h> // include the Adafruit Motor Lib. in our code.
AF_DCMotor motor(2, MOTOR12_64KHZ); // Creats a Motor-Object ( port# 2, the Controlling-Signal-Speed).
void setup() {
motor.setSpeed(200); // sets the Motor-Speed ( its PWM Value: start from 0 upto 255)
}
void loop() {
motor.run(FORWARD); // turn the Motor direction to FORWARD
delay(1000); // delay specifiy the duration of the Motion
motor.run(BACKWARD); // turn the Motor direction to BACKWARD
delay(1000);
motor.run(RELEASE); // Stops the Motor RELEASE
delay(1000);
}