Previous

This is the 20th example in a series of examples for arduino beginners. For more examples click these buttons or select a example from the grid at the bottom.

Next

Description

This is the 20th example in our arduino for beginners series and in this one we implement a stepper motor controller, using the popular ULN2003 darlington array IC. Using this IC unipolar motors can be controller easily and hence in this example we are using the stepper motor in the unipolar configuration.

Code

#include <Stepper.h>
const int stepsPerRevolution = 200;
Stepper myStepper(stepsPerRevolution, 9,10,11,12);

void setup() {
myStepper.setSpeed(60);
Serial.begin(9600);
}

void loop() {
Serial.println(“clockwise”);
myStepper.step(stepsPerRevolution);
delay(500);
Serial.println(“counterclockwise”);
myStepper.step(-stepsPerRevolution);
delay(500);
}

Pictures / Video

Arduino For Beginners - Stepper Motor Control
Arduino For Beginners - Stepper Motor Control
Arduino For Beginners - Stepper Motor Control

Files

Arduino SketchFritzing File

Share This

Other Examples

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

Other Learning Resources