const int dirPin = 3;
const int stepPin = 2;
const int stepsPerRevolution = 200;
void setup() {
// put your setup code here, to run once:
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(dirPin, LOW);
for(int x= 0; x < stepsPerRevolution; x++)
{
digitalWrite(stepPin, HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);
}
delay(100);
}