controlling 13 stepper motors with one arduino mega

I’m trying to control 365 motors with 28 arduino boards but I don;t know why I can only control 1 stepper motor with one board I try in many ways but I can control only one motor …

Can someone help me

//Santiago Leal

/-----( Import needed libraries )-----/
#include <Stepper.h>

Stepper stepper_a(128, 8, 9, 10, 11); //cw
Stepper stepper_b(128, 8, 11, 9, 10);//ccw

int Steps2Take_a = 0;
int Steps2Take_b = 0;
void setup(){
}
void loop()
{
stepper_a.setSpeed(128);
Steps2Take_a = 40960;
stepper_a.step(Steps2Take_a);
stepper_a.setSpeed(128);
Steps2Take_b = 40960;
stepper_a.step(Steps2Take_b);
stepper_b.setSpeed(128);

}
/* --(end main loop )-- */

When I try to do the same with the other motors the board don;t light them …

What can I do ?

but I don;t know why I can only control 1 stepper motor with one board

This is because the library you are using can only control one motor at any one time. You will have to write code yourself to control the motors and not use the library. Look at the way the RepRap project controls several motors at the same time.

Would be using less pins if you went for something like this http://www.pololu.com/catalog/product/1182 and at the same time it would also be easier to control, since you only need a direction and step pin. If you want to control when the stepper should be enabled or not, it will take an additional pin, but it can be wires to be always enabled.

If the steppers only should run the same direction, you can go down to just the step pin, so only one wire will be needed for each motor.