#include<Stepper.h>
int rest=500;
int pause=5000;
int ms1=13;
int ms2=12;
int ms3=11;
int stepPin=8;
int dirPin=7;
void setup() {
Serial.begin(9600);
pinMode(stepPin,OUTPUT);//moves the motor one step on every HIGH pulse.(modified smaller by combinations of ms pins)
pinMode(dirPin,OUTPUT);//directional pin, HIGH(1)=clockwise, LOW(0)=counter-clockwise
digitalWrite(ms1,HIGH);
}
void loop() {
digitalWrite(dirPin,HIGH);
for(int j=0; j<400; j++){
digitalWrite(stepPin,HIGH);
digitalWrite(stepPin,LOW);
delayMicroseconds(pause);
}
digitalWrite(dirPin,LOW);
delay(rest);
for(int j=0; j<400; j++){
digitalWrite(stepPin,HIGH);
digitalWrite(stepPin,LOW);
delayMicroseconds(pause);
}
delay(rest);
}