// defines pins numbers const int stepPin1 = 10; const int dirPin1 = 12; void setup() { // put your setup code here, to run once: pinMode(stepPin1,OUTPUT); pinMode(dirPin1,OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(dirPin1,HIGH); // Enables the motor to move in a particular direction digitalWrite(stepPin1,LOW); //one revolution for(int x = 0; x < 200; x++) { digitalWrite(stepPin1,HIGH); delayMicroseconds(700); digitalWrite(stepPin1,LOW); delayMicroseconds(700); } delay(1000); digitalWrite(dirPin1,LOW); // Enables the motor to move in a particular direction digitalWrite(stepPin1,LOW); //one revolution for(int x = 0; x < 200; x++) { digitalWrite(stepPin1,HIGH); delayMicroseconds(700); digitalWrite(stepPin1,LOW); delayMicroseconds(700); } delay(1000); }