Header Ads Widget

Run stepper motor with Arduino in Telugu

 VIDEO:



CODE :

#include <Stepper.h>
int stepsPerRevolution = 2048;  // change this to fit the number of steps per revolution
// initialize the stepper library
Stepper myStepper(stepsPerRevolution, 5,7,6,8);

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

void loop() {
  myStepper.step(stepsPerRevolution);
  delay(1000);
  myStepper.step(-stepsPerRevolution);
  delay(1000);
}


Post a Comment

0 Comments