Need to remove acceleration with AccelStepper driven motor

Robin2:
So why not use that in your project?

...R

...I tried the following , but the motor doesn't turn at all.

void loop()
{
        if(Serial.available())
        {
            TriggerByte = Serial.read();
        }
        if(TriggerByte == 65 //ASCI "A"
           &&
           LastMotorState == 1)
         {
            stepper.setSpeed(3000);
            stepper.setCurrentPosition(800);
            stepper.moveTo(-800);
                 while(stepper.currentPosition() != -800)
                 stepper.runSpeed();
            LastMotorState = 2;
        }
        if(TriggerByte == 66 //ASCI "B"
           &&
           LastMotorState == 2)
         {
            stepper.setSpeed(3000);
            stepper.setCurrentPosition(-800);
            stepper.moveTo(800);
                 while(stepper.currentPosition() != 800)
                 stepper.runSpeed();
            LastMotorState = 1;
        }
}

There must be something I am overlooking, but I can't figure out what.

raschemmel:
Physics ?
Object at standstill must accelerate to reach any velocity ?

Indeed, accelerate they must! :wink: ...but the documentation of Accelstepper insists that stepping the motor without using the algorithmic acceleration is possible.