Running motor when button is held down.

Hello I am working with the bigeasydrive and using the AccelStepper library and I have a fairly ridiculous question.

Now I simply want to run a motor when Button1 is pressed and it will run constantly until Button2 is pressed. I am not having any issues with the actually structure of the loop, but I cannot figure out how to use the AccelStepper library to simply run without specifying a position.

I did a fair amount of research and haven't found anything helpful! Although I have achieved it using micro-stepping, the motor speed is slower then when using the accelstepper library.

Here is what I have so far.

 while(buttonState1 == HIGH && buttonState2 == HIGH)
 {
    digitalWrite(smEnablePin, LOW);
    stepper_system.move(2000);
    stepper_system.runSpeed();(smEnablePin, LOW);
//    stepper_system.move(2000);
//    stepper_system.runSpeed();
    buttonState1 = digitalRead(reel_full);
    buttonState2 = digitalRead(slack_sensor);
  }
  stepper_system.stop();
   digitalWrite(smEnablePin, HIGH);

This works the first time I use it but then the motor blocks after I leave the loop and return.

I've used this code using micro-stepping which worked well, but doesn't allow me to reach the same speeds.

while(buttonState1 == HIGH && buttonState2 == HIGH)
 {
    digitalWrite(smEnablePin, LOW); //Enabling the motor, so it will move when asked to
    digitalWrite(sys_step_pin, HIGH);
    delayMicroseconds(speed);
    digitalWrite(sys_step_pin, LOW);
    delayMicroseconds(speed);
    buttonState1 = digitalRead(reel_full);
    buttonState2 = digitalRead(slack_sensor);
  }
  stepper_system.stop();
   digitalWrite(smEnablePin, HIGH);

***BONUS QUESTION.....Why when I decrease the delayMicroseconds(speed), my motor will block and make that buzzing sound? --Not important just wondering if anyone want's to throw in an explination!

Thank you for any and all help!

There is no such thing as a "Bonus Question" - fewer questions would be a bonus :)

You could arrange your code so it continually increases the value in the destination - or just set the destination to a very large number.

If you want the motor to run continuously maybe you don't need the AccelStepper library at all. Have a look at the second example in this Simple Stepper Code

You may be reducing the delayMicroseconds() interval to the point where the motor cannot keep up.

...R Stepper Motor Basics

Use stepper.runSpeed() instead of stepper.run() in your loop() function for speed control.