Here is a very simple code to test a stepper connected tothe X axis A4988 driver in a CNC shield V3 on an Uno. Tested, successfully, just now on my setup.
#define CW 0
#define CCW 1
const byte stepPin = 2;
const byte dirPin = 5;
const byte enablePin = 8;
unsigned long stepTime = 2400; // change this to change speed. lower is faster
void setup()
{
Serial.begin(115200);
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, LOW);
digitalWrite(dirPin, CW);
}
void loop()
{
oneStep();
}
void oneStep()
{
static unsigned long timer = 0;
unsigned long interval = stepTime;
if (micros() - timer >= interval)
{
timer = micros();
digitalWrite(stepPin, HIGH);
delayMicroseconds(10);
digitalWrite(stepPin, LOW);
}
}
That sounds like the motor is enabled, but is not getting step pulses.