Go Down

Topic: control 2 stepper motor (Read 591 times) previous topic - next topic

roipoussiere

Hello!
I'm making a project using 2 stepper motor.
With the Stepper librairy, it's works very well for one motor.
But how to control 2 motors together?
With this instruction:
motor1.step(48);
motor2.step(48);

The motor 1 move and after, the motor 2 move.
I have also tried this:
for(int i = 1; i <= 48; i++)
{
   moteur1.step(1);
   moteur2.step(1);
}

But it don't works very well: the motors are slow and make bad noise.

Thanks for your help and sorry for my english ;)
N'attendez pas de savoir pour entreprendre.
Drawall, le robot qui dessine : http://drawall.cc/

Chagrin

When you motor.step(1) you lose the delay between steps that motor.setSpeed() provides. Try adding a delay() in your loop.

Just a guess, but it sounds intelligent ... so I'm sticking with it.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy