Complete the code to define the step pin for the stepper motor driver.
const int stepPin = [1];The step pin is connected to digital pin 9 on the Arduino.
Complete the code to set the direction pin as an output in the setup function.
void setup() {
pinMode([1], OUTPUT);
}The direction pin controls the rotation direction and must be set as output.
Fix the error in the loop to make the motor step correctly.
digitalWrite(stepPin, HIGH); delay([1]); digitalWrite(stepPin, LOW); delay(1);
A delay of 10 milliseconds between steps allows the motor to move smoothly.
Fill both blanks to complete the code that sets the motor direction and steps it.
digitalWrite([1], HIGH); digitalWrite([2], HIGH); delay(10);
Set the direction pin HIGH to choose direction, then pulse the step pin HIGH to move one step.
Fill all three blanks to create an array holding the pin numbers for stepPin, dirPin, and enablePin.
const int pins[] = { [1], [2], [3] };The array holds the pin numbers for step, direction, and enable pins used by the driver.
