Try to get this code to work can some one please tell me what is wrong:

#include <AccelStepper.h>

//AccelStepper Xaxis(1, 2, 5); // pin 2 = step, pin 5 = direction
//AccelStepper Yaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
//AccelStepper Zaxis(1, 4, 7); // pin 4 = step, pin 7 = direction

AccelStepper Xaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
AccelStepper Yaxis(1, 4, 7); // pin 4 = step, pin 7 = direction
AccelStepper Zaxis(1, 5, 9); // pin 5 = step, pin 8 = direction

void setup() {

void loop() {

First you need to tell us what it actually does, and what you want it to do that is different.

It looks to me like you have forgotten to provide any destination for the motor moves - how many steps?

And for the future please post your code between [code] [/code] tags so your code looks like thisand is easy to copy to a text editor


Haven't used this library but -

From the documentation:
This module operates by computing a step time in microseconds. The step time is recomputed after each step and after speed and acceleration parameters are changed by the caller. The time of each step is recorded in microseconds. The run() function steps the motor once if a new step is due. The run() function must be called frequently until the motor is in the desired position, after which time run() will do nothing.

What is your desired position?