void loop()
{
motor.speed(0, 100);
delay(1000);
motor.brake(0);
delay(1000);
motor.speed(0, -100);
delay(1000);
motor.stop(0);
delay(1000);
}
// END FILE
Then you will find your motor move (1s), stop (1s), move back (1s), stop (1s), and
loop.
If there's nothing happen, please make sure:
•
You had uploaded the code successfully
•
Your motor connect right
•
The led indicators blink right
Drive a Stepper
You can drive a 4-wire stepper with this shield. Here I will show you how to drive
a
stepper
// set motor0 to speed 100
// brake
// set motor0 to speed -100
// stop
Need help?
Do you have a question about the Motor Shield V2.0 and is the answer not in the manual?
Questions and answers