Often, the solution to most simultaneous software delay problems is a state machine. Generally, a state machine is an infinite loop with no or few delays. The state machine's job is to keep track of all the possible state the software is to control.
In this case we might try to implement:
- LED on & motor active.
- LED off & motor active.
- LED on & motor is not active.
- LED off & motor is not active.
The library Adafruit_StepperMotor you have chosen might be blocking. This text from the Arduino reference step library admits this similar function is blocking:
This function is blocking; that is, it will wait until the motor has finished moving to pass control to the next line in your sketch.
If so, and the call to step() blocks the LED action for longer then is tolerable, consider calling step() with fewer step such that the blocking delay is tolerable. For example, 100 steps are desired, consider calling step 10 times only advancing the motor 10 steps each time.
Back to the state machine. To keep track of the above 4 state you need 2 flags. An LED flag and a Motor flag. Control the LED flag using mills() not delay().
Returns the number of milliseconds passed since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.
Consider writing the state machine code to immediately turn the LED on and save the current value returned from mills(). Each subsequent time through the state machine check if mills() returns a value 1000 more than the value saved (do consider that mills() will eventually overflow and start over at zero). When it does toggle the LED, save the new mills() returned value and start checking each subsequent time through the state machine.
As we are running the state machine over and over again as fast as the processor can manage, we can also test an externally set flag to run the motor. We need to determine if the call to step() is blocking. If it is we need to determine the maximum number of steps / delay tolerable by the LED feature. If we discover this is, say, 10 step, we need to devise code to divide the desired number of steps into individual calls of 10 or less steps. If this approach is desired, control the state machine's motor flag by activating it when the number of steps is > 0. Subtracting 10 from the number of steps every iteration through the state machine. And setting the state machine's motor flag to deactivate when steps is = 0.