Steppertxt
Steppertxt
// Define the AccelStepper interface type: 4 wire motor in half step mode:
#define MotorInterfaceType 8
void setup() {
// Set the maximum steps per second:
stepper.setMaxSpeed(1000);
}
void loop() {
// Set the speed of the motor in steps per second:
stepper.setSpeed(500);
// Step the motor with constant speed as set by setSpeed():
stepper.runSpeed();
}