void loop()
{
motor.speed(0
, 100);
// set motor0 to speed 100
delay
(1000)
;
motor.brake
(0)
;
// brake
delay
(1000)
;
motor.speed
(0, -100)
;
// set motor0 to speed -100
delay
(1000)
;
motor.stop
(0)
;
// stop
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