Accelstepper with two motors

Robin2:
And please note that the code in Reply #18 is NOT appropriate for an A4988 stepper driver.

...R

I known this is possible. As written, I don't know that motor and this code is a sample for a tipical kind of motor (a standard four wires, four steps), not for each motor in the world, and it DO NOT USE any library.

I suggested a way to use a standard stepper motor without using a library, explaining how it works at low-level.

If anyone prefer to usa a library, he MUST read and understand its documentation.

My suggestion is to learn how the motor works, then to learn how library works and, finally, write code. Doing these steps in reverse order will cause only problems.

Carlo

carloroma63:
I known this is possible. As written, I don't know that motor and this code is a sample for a tipical kind of motor (a standard four wires, four steps),

The problem with your code is not the type of motor but the type of driver. The A4988 just needs a step and a direction connection to the Arduino. Posting inappropriate code is just confusing for inexperienced people.

...R