My stepper motor uses a specific code, since it’s plugged into a shield and not the arduino uno directly. I was wondering if someone could help me lower the rpm’s.
The delays in the calls to delayMicroseconds are setting the pulse rate.
You should look at using AccelStepper or Stepper libraries to talk to this motor. The shield just
needs step and direction inputs, so its driven just like any other chopper driver module such as
DRV8825 or A4988 stepper boards.
All of those delay() functions take time and determine the amount of time between steps (stepper speed). Best is to get rid of the delay()s and use the blink without delay (see IDE examples) method for timing. Or use a stepper library that allows you to set the speed (AccelStepper)
To use the code as is, include an argument to your step function that lets you control the delayMicrosecond() duration.
void step(boolean dir,int steps, unsigned long stepDelay)
and later
delayMicroseconds(stepDelay);