Hi,
How can I synchronize 2 stepper motors with Shield V2 ?
sincronizare stepper motors
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: sincronizare stepper motors
To step the motors in sync, you need to do your own step timing and move each motor using the onestep() command.
Code: Select all
for (int i = 0; i < stepCount; i++)
{
motor1->onestep(FORWARD, DOUBLE);
motor2->onestep(FORWARD, DOUBLE);
delaymicroseconds(stepInterval);
}
- Delia
- Posts: 15
- Joined: Fri Jun 03, 2016 4:23 am
Re: sincronizare stepper motors
Thanks.
But probably I did't ask corect, I want to start the motors in the same time but I don't want to stop them at the same time. More exactly I want to rotate one motor more than the other but I want to start them in the same time.
But probably I did't ask corect, I want to start the motors in the same time but I don't want to stop them at the same time. More exactly I want to rotate one motor more than the other but I want to start them in the same time.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: sincronizare stepper motors
For that purpose, AccelStepper is probably your best choice. There are a couple examples using AccelStepper in the V2 motor shield library.
Please be positive and constructive with your questions and comments.