@Robin2 I really apprecite your help with this. Your code is really easy to understand and modify, it certainly is helping lots of people that needs a simple code.
But I still have this question: how to make a single step. One only step. If I use this code of yours only once:
digitalWrite(stepPin, HIGH);
delayMicroseconds(pulseWidthMicros); // this line is probably unnecessary
digitalWrite(stepPin, LOW);
delay(millisbetweenSteps);
You agree with me that if there is ONLY ONE step the delay(millisbetweenSteps); will have no need, correct? So how will the motor know the speed to make this one step?