AccelStepper.h, motors will not move.

If your motors work with another program then that eliminates the doubt that was in my mind - eliminate potential problems one by one :slight_smile:

I suggest you get rid of all the WHILEs from your program. They are not necessary.

Try this and see what happens

void loop() {
    if (X < 2)
    {
        stepper1.move(steps);
        stepper1.setSpeed(1000);
        stepper1.runSpeedToPosition();
        delay(2000);
        X = X + 1;
    }
}

By the way loopCount would be a much more meaningful name than X.

Also, single character variable names can make debugging very difficult.

...R