Hi all,
I'm using an Arduino Uno with an A4988 driver to control a NEMA 17 stepper motor. I’ve connected STEP to pin 2 and DIR to pin 3. The motor powers up but only vibrates or makes noise—it doesn't rotate properly.
Here’s my basic code:
#define STEP 2
#define DIR 3
void setup() {
pinMode(STEP, OUTPUT);
pinMode(DIR, OUTPUT);
digitalWrite(DIR, HIGH);
}
void loop() {
digitalWrite(STEP, HIGH);
delayMicroseconds(800);
digitalWrite(STEP, LOW);
delayMicroseconds(800);
}
Do I need to adjust the current limit on the A4988? Should I use a library like AccelStepper for smoother control?
Any advice is welcome!
Thanks!
I'm using an Arduino Uno with an A4988 driver to control a NEMA 17 stepper motor. I’ve connected STEP to pin 2 and DIR to pin 3. The motor powers up but only vibrates or makes noise—it doesn't rotate properly.
Here’s my basic code:
#define STEP 2
#define DIR 3
void setup() {
pinMode(STEP, OUTPUT);
pinMode(DIR, OUTPUT);
digitalWrite(DIR, HIGH);
}
void loop() {
digitalWrite(STEP, HIGH);
delayMicroseconds(800);
digitalWrite(STEP, LOW);
delayMicroseconds(800);
}
Do I need to adjust the current limit on the A4988? Should I use a library like AccelStepper for smoother control?
Any advice is welcome!
Thanks!