Unable to run code on stepper motor driver board

  arduino, arduino-uno, c++

I have an arduino and I am trying to run the following code.

I am using the stepper model "28BYJ-48". It uses a driver board and I cant seem to find out how to run this. The code wont run and I have tried to re wire and see tutorials. It there any code which can turn my stepper motor using a driver board with a wiring chart? I also cant find anywhere on how to wire the board and I used pictures and got some idea. I am using a Arduino Uno.

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

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);
}

Source: Windows Questions C++

LEAVE A COMMENT