Pololu Nema 17 Unipolar/Bipolar, 200 Steps/Rev, 42×48mm, 4V, 1.2 A/Phase

Used Products:

1. Stepper Motor: Unipolar/Bipolar
2. ULN2803APG

Content:

Çeşme: http://www.thewebblog.net/icerikgoster.php?yaziID=85

Code:

#include <Stepper.h> const int stepsPerRevolution = 200; Stepper myStepper(stepsPerRevolution, 2,3,4,5); // Kullanılan parametreler // 100 - Bir turdaki step sayısı // 2 - INPUT PIN 1 // 3 - INPUT PIN 2 // 4 - INPUT PIN 3 // 5 - INPUT PIN 4 void setup() { // set the speed at 60 rpm: myStepper.setSpeed(80); // initialize the serial port: Serial.begin(9600); } void loop() { // step one revolution in one direction: Serial.println("clockwise"); myStepper.step(stepsPerRevolution); delay(500); // step one revolution in the other direction: Serial.println("counterclockwise"); myStepper.step(-stepsPerRevolution); delay(500); }