daryllqayyimdarplayzgt
Published © CC BY-NC

Arduino uno stepper motor basic

This is a simple arduino uno stepper motor basic

BeginnerProtip25,973
Arduino uno stepper motor basic

Things used in this project

Hardware components

stepper motor 28BYJ-48
×1
Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

This is the stepper motor tutorial.

just do the same ok.:D

Code

copy the code and paste

Java
just copy.
// Arduino stepper motor control code

#include <Stepper.h> // Include the header file

// change this to the number of steps on your motor
#define STEPS 32

// create an instance of the stepper class using the steps and pins
Stepper stepper(STEPS, 8, 10, 9, 11);

int val = 0;

void setup() {
  Serial.begin(9600);
  stepper.setSpeed(200);
}

void loop() {

  if (Serial.available()>0)
  {
    val = Serial.parseInt();
    stepper.step(val);
    Serial.println(val); //for debugging
  }
 

}

Credits

daryllqayyim

daryllqayyim

8 projects • 4 followers
darplayzgt

darplayzgt

9 projects • 3 followers

Comments