welcome to my post
i am not getting that how i can get info about interfacing of my driver board with arduino mega.This board is using STK672-080 driver.4 Motors are being used and are unipolar.This driver board has 4 inputs
1-CLK
2-DIR
3-ENA
4-GND
signal from arduino will be received at these inputs.same driver and arduino has been used to drive single motor using simple stepper motor library.
Now i want to use <AccelStepper.h> library for driving 4 seperate motors with separate similar driver card for each motor.I think i have option of using <AccelStepper.h> library only.
one simple code of stepper with this multi stepper library is given below
// MultiStepper.pde
// -- mode: C++ --
//
// Shows how to multiple simultaneous steppers
// Runs one stepper forwards and backwards, accelerating and decelerating
// at the limits. Runs other steppers at the same time
//
// Copyright © 2009 Mike McCauley
// Id: HRFMessage.h,v 1.1 2009/08/15 05:32:58 mikem Exp mikem
#include <AccelStepper.h>
// Define some steppers and the pins the will use
AccelStepper stepper1; // Defaults to 4 pins on 2, 3, 4, 5
AccelStepper stepper2(4, 6, 7, 8, 9);
AccelStepper stepper3(2, 10, 11);
void setup()
{
stepper1.setMaxSpeed(200.0);
stepper1.setAcceleration(100.0);
stepper1.moveTo(24);
stepper2.setMaxSpeed(300.0);
stepper2.setAcceleration(100.0);
stepper2.moveTo(1000000);
stepper3.setMaxSpeed(300.0);
stepper3.setAcceleration(100.0);
stepper3.moveTo(1000000);
}
void loop()
{
// Change direction at the limits
if (stepper1.distanceToGo() == 0)
stepper1.moveTo(-stepper1.currentPosition());
stepper1.run();
stepper2.run();
stepper3.run();
}
the point is which pins of arduino i have to attach with my driver input pins named as below
1-CLK
2-DIR
3-ENA
4-GND
Thnx in advance for responce