I have a Bipolar Stepper Motor (12V, 350mA, 28oz-in NEMA-17) and would like to run it in the highest resolution (Sixteenth Step) with the A4988 Driver. According to multiple sources I read I need to "put 5V" to the MS 1,2,3 pins. What does this mean/How can I achieve this ?
Do I need to hook up the MS 1,2,3 to the digital pins of the Arduino and write Digital High. Or do I need to hook all of them to 5V together ? And should the code look like this ? Is this safe/good pratice ?
int MS1Pin = 8; // Set MS Pins
int MS2Pin = 9;
int MS3Pin = 10;
void setup()
{
pinMode(MS1Pin, OUTPUT); // sets the digital pin as output
pinMode(MS2Pin, OUTPUT); // sets the digital pin as output
pinMode(MS3Pin, OUTPUT); // sets the digital pin as output
}
void loop()
{
digitalWrite(MS3Pin, HIGH);
digitalWrite(MS2Pin, HIGH);
digitalWrite(MS1Pin, HIGH);
<<MY CODE here>>
}
Sorry for these beginner questions, I just don't want to fry the Chip and this to work.
Thank you.