How to make stepper motor clockwise and anticlockwise

I want to make a system where when the LDR and rain sensor receives a voltage above 300, it gives a command to the stepper motor to move clockwise. And when LDR and rain sensor gives voltage below 300, the stepper motor will turn anticlockwise and another stepper motor that is attached to a DIY fan will also turn. But why does both condition make the motor turn clockwise?? please help me

FINAL_CODING.ino (1.39 KB)

CIRCUIT DIAGRAM WITH LABEL.pdf (78.8 KB)

Can you get the motors to turn both ways if you run the library examples?

What does your serial output say?

Where are you getting power for the steppers?

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.