/* write a program to run a stepper motor clockwise & anticlockwise using arduino board */
#include <Stepper.h>
int rmotor =200;
Stepper demo (rmotor,8,9,10,11);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
demo.setSpeed(50);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Clockwise");
demo.step(rmotor);
delay(1000);
Serial.println("Anticlockwise");
demo.step(-rmotor);
delay(1000);
}