which stepper library?

Hello arduino users.
I have recently received a lead shine stepper driver and a brand new uno.
In order to control my 3A high torque stepper, I wanted to find the good library.
I tried to open the accelstepper or custom stepper examples but each of them implies 4 controlling pins.
Can i adapt it to my 2 pulse and dir pin?
I also found a library on github that was adapted to my driver:GitHub - ronivaldo/Arduino-StepperMSeries: Stepper library for Arduino: control signals for Leadshine High Performance Microstepping M Series Drive http://www.leadshine.com/series.aspx?type=products&category=stepper-products&producttype=stepper-drives&series=M
the problem is 150 rpm is the fastest speed my stepper go, 200 or 250 does not change anything.
May I go faster with this library?

#include <StepperMSeries.h>

// change this to the number of steps on your motor
#define STEPS 200
#define PULSE_PIN 8

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
StepperMSeries stepper(STEPS, PULSE_PIN, DIRECTION_PIN);

void setup() {
  // set the speed 
  // initialize the serial port:

void loop() {
  // step one revolution  in one direction:
   // step one revolution in the other direction:

thank you!

A quick Google of leadshine stepper driver suggests that they just need step, direction and enable. Why would you need any library?


Maybe because I thought it would be easier for acceleration and deceleration settings?

you can use the accelstepper library with the following defining a stepper driver board that only needs step and direction pins to work

#include <AccelStepper.h>

AccelStepper stepper1(1,7,8);   // step pin = 7 dir pin = 8

Thank you exact, that is what I needed.
Library is working great.
Thanks again

jgerten: The Driver board has Pins CP+/CP-/CW+/CW-/EN+/EN-

I think AccelStepper Library defaults to pin 2/3/4/5 -

You have asked your question in a very old Thread so I have suggested to the Moderator to move you to your own Thread.

The usual connections for a stepper driver are step (or pulse), direction and enable. As you have not provided a link to the datasheet for your driver I'm guessing that your CP pins are the step and CW are the direction pins. If that is correct you should connect all the - pins to Arduino GND and connect the CP+ pin to your step pin and your CW+ pin to your direction pin.

The AccelStepper setting should

AccelStepper stepper(1, stepPin, directionPin);

Some drivers don't require the EN pin to be connected and some do. If you think it is needed try connecting EN+ to 5v or to GND