Pages: [1]   Go Down
Author Topic: Stepper Motor library and example  (Read 1165 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

  The stepper motor library does not state the order in which it drives the pins.  Looking at the code, it drives the pins out of order.  So code like:

Stepper(steps, pin1, pin2, pin3, pin4)

Will drive the pins in the order:  pin1, pin3, pin2, pin4

This means that the code works for stepper motors which have the pins out of order, but fails for stepper motors which have the pins in sequential order.  I happen to have a stepper motor where the pins are in sequential order, leading to much confusion when I tried to do the example.  It was only by hooking up LEDs and running the example really slowly that I worked out what was wrong.

So could you please:

1) Update the documentation page: http://arduino.cc/en/Reference/StepperConstructor   to state exactly what order the pins will be driven in  (pin1, pin2, pin3, pin4)

2) Update the tutorial page: http://arduino.cc/en/Tutorial/MotorKnob   to state the same.

3) Say on both what to do if the stepper motor requires the pins in sequential order  (e.g wire it differently or use Stepper(pin1, pin3, pin2, pin4)

Thanks!

JohnFlux
Logged

Pages: [1]   Go Up
Jump to: