![Adafruit Motor Shield V2.0 Manual Download Page 8](http://html1.mh-extra.com/html/adafruit/motor-shield-v2-0/motor-shield-v2-0_manual_2845849008.webp)
digitalWrite(10, HIGH);
stepper.step(steps);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
}
void
setup
()
{
// set the speed of the motor to 30 RPMs
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
stepper.setSpeed(30);
}
void
loop
()
{
step(1000);
step(-1000);
}
// END FILE
If there’s nothing happen, please double check if you had connected the wire right.
Library APIs
begin
Description
void
begin
();