<Stepper.h>

Hi all,

Does the standard <Stepper.h> library let me use two stepper motors simultaneously?

I can get one motor to rotate, then the second motor to rotate, but I can't get them to rotate at the same time.

I'll try and put the sketch into this post

Thanks
Mick

sketch_mar15b.ino (1.76 KB)

Its easier for us if you put the code directly in your post (within code tags) rather than in an attachment.

I haven't used the Stepper library, but if your code is causing stepper1 to do all its steps before stepper2 starts then it seems as if you are out of luck. There is an accelStepper library that is more sophisticated, it may be worth trying.

If you want the steppers to move strictly in sync with each other (as you would need for a CNC machine) I suspect you will have to write your own code, and it's not really difficult.

Can you provide links to the specifications for your motors and your driver boards?

...R

No, the Stepper library does not allow for simultaneous control of multiple steppers. The AccelStepper library does.

Thanks for that, PaulS

at least now I know that I'm not completely silly. :smiley:

Robin2,

I'll try accelStepper, seems the way to go. The motors are the standard 28BYJ-48, and I will have to learn how to put the code directly into a post,. there must be instructions on the forum somewhere.

Mick

MickyK:
how to put the code directly into a post,. there must be instructions on the forum somewhere.

Just paste the code into the edit window. BUT BUT BUT... before you do so click the # icon which creates a pair of code markers [ code] [ / code] (without the spaces) and paste your code between them.

...R

Thanks for the info,

Mick