for (int i = 0; i < stepsToMove; i++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(stepDelay);
digitalWrite(stepPin, LOW);
delayMicroseconds(3000);
}
I tried to increase the time between the start of the next signal and current signal as delayMicroseconds(3000); but this is making the motor make loud noises and is also making it stop although being able to move it at speeds it is running at with this code is something I would have liked.