Download Print this page

Adafruit Motor Shield V2.0 Manual page 8

Advertisement

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();

Advertisement

loading
Need help?

Need help?

Do you have a question about the Motor Shield V2.0 and is the answer not in the manual?

Questions and answers