How to Control Stepper Motor using Arduino (Source Code)



Click Here For Circuit Diagram
Programming Code:

#include 


//create an instance of a stepper motor object
Stepper stepper(96, 8, 9, 10, 11);


void setup()
{
// set the speed of the motor to 10 RPMs
stepper.setSpeed(10);
}


void loop()
{
stepper.step(96); //on revolution
delay(2000); //wait 2 seconds
}

Lastly, here's a video to show this program in action with the whole circuit:





1 Comments
Disqus
Fb Comments
Comments :

1 comment: