/*
Arduino | hardware-help
NEMA 17 stepper motor help
Padogee September 25, 2025 — 4:12 PM
Hello, when I turn the power on for my nema 17 stepper motor
with a A4988 driver, it just does like one or 2 big steps,
then stops and kind of squeals, getting quieter and quieter.
I followed this tutorial so I have the same wiring (except for
coils which I did myself so they’re correct) and code as the
first example in the video :
https://youtu.be/wcLeXXATCR4?si=PTPUoKzs47RR--uc.
*/
const int dirPin = 2; // direction pin
const int stepPin = 3; // step pin
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);
// set direction of rotation to clockwise
digitalWrite(dirPin, HIGH);
}
void loop() {
// take one step
digitalWrite(stepPin, HIGH);
delayMicroseconds(2000);
// pause before taking next step
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);
}