#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
bormar:
Stepper myStepper(stepsPerRevolution, 4,5,6,7);
Try Stepper myStepper(stepsPerRevolution, 4,5,7,6); or
Stepper myStepper(stepsPerRevolution, 5,4,6,7);
Hi,
Post a schematic of how everything is connected in your project.
RV mineirin
bormar
May 16, 2021, 7:51pm
12
IT'S a standard way to connect this type of stepper (28byj-48)
bormar
May 16, 2021, 7:53pm
13
anyway, i replaced 2 motors and 2 drivers!
Hi,
Its stepper motor and driver are similar to this one?
RV mineirin
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
system
Closed
September 13, 2021, 8:28pm
17
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.