I'm working on a home automation project where my curtains open and close, i'm using a stepper motor to control this action, i used the included stepper motor library to get the motor moving but now i need some help with the code to make it move either clockwise or counter-clockwise depending on a input.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.Do not send technical questions via personal messaging - they will be ignored.I speak for myself, not Arduino.

The program you posted in Reply #3 makes the motor move in both directions. So all you now need is some code to change the value of a variable from (say) 'F' to 'R' so that you can control the direction.

...R

Two or three hours spent thinking and reading documentation solves most programming problems.