Need help ! Arduino 2560 stepper won’t rotate reverse

#include <Stepper.h>
//28byj-48
const int stepsPerRevolution =32 ;
Stepper myStepper(stepsPerRevolution, 4,5,6,7);

void setup() {

myStepper.setSpeed(150); // RPM

myStepper.step(100);
delay(1000);

myStepper.setSpeed(150); // RPM

myStepper.step(-100); // **ANY IDEA, WHY DO NOT CHANGE DIRECTION HERE?
delay(1000);

}

void loop ()
{}

@bormar, your topic was moved to a more suitable location of the forum.

No idea about steppers, but maybe you need to add a delay after that.

no, it rotates but in the same direction

Try Stepper myStepper(stepsPerRevolution, 4,5,7,6); or
Stepper myStepper(stepsPerRevolution, 5,4,6,7);

tried, the same effect

Hi,
Post a schematic of how everything is connected in your project.

RV mineirin

  1. Use a DMM and measure resistance in the stepper coils in order to make sure the cables are paired properly between the stepper and the driver. If this match is wrong my previous suggestion is useless.
  2. There are 5 cables from stepper to drive but only 4 from driver to controller. Please explain that.

IT'S a standard way to connect this type of stepper (28byj-48)

anyway, i replaced 2 motors and 2 drivers!

Hi,
Its stepper motor and driver are similar to this one?

450xN-4-2

RV mineirin

exactly

Hi,
This is your schet's "time chart".
He's correct.
The problem is either in your drive, engine or connections.

Note: I reduced steps and delay to make it easier to view.

RV mineirin