Stepper Motor Troubles

Hey, so I am new to arduino. I am doing this project involving the arduino uno, this stepper motor shield: https://www.dfrobot.com/wiki/index.php/Stepper_Motor_Shield_For_Arduino_(SKU:DRI0023), and this stepper motor: Pololu - Stepper Motor: Bipolar, 200 Steps/Rev, 35×36mm, 2.7V, 1 A/Phase. I am pretty sure the wiring is correct. The code is most likely the problem. I got the code from the stepper motor shield link. It might be the pins in the beginning of the code or the whole code itself, not sure. Any help will be great, thanks.

int M1dirpin = 4;
int M1steppin = 5;
void setup()
{
pinMode(M1dirpin,OUTPUT);
pinMode(M1steppin,OUTPUT);
}
void loop()
{
int j;
delayMicroseconds(2);
digitalWrite(M1dirpin,LOW);
for(j=0;j<=5000;j++){
digitalWrite(M1steppin,LOW);
delayMicroseconds(2);
digitalWrite(M1steppin,HIGH);
delay(1);
}
}

This is the set up.

IMG_2568.JPG

Image from Reply #1 so we don’t have to download it. See this Image Guide

f33cf9bb78c4eb122aaa48336d8b6fe748260eec.jpg

…R

A few things....

Change the delay(1) in the last line to delay(500) for very much slower motion. If it works you can speed it up.

How have you set the current limit on the A4988 drivers? It should be set for 1 amp for those motors. A bit less would be OK, but not more.

Have you connected the motors correctly? Use your multimeter to confirm which wires make the pairs for the two motor coils.

What stepper motor power supply are you using - volts and amps?

...R
Stepper Motor Basics
Simple Stepper Code

Thanks for the help! It is working now. One of those changes must of done the trick. I think it was a combination of incorrect wiring and not enough power supply.