DC motor backward ,forward and stop....HELP!

How to Change the direction of a DC motor in arduino uno?

here is a great resource for you to explore..

well, thank u very much...

Hope that helped :slight_smile:

Come on there are thousands of tutorials on that topic... coming here and asking such a question does not make sense. You need to do a bit of homework before starting or explain why the tutorials you tried did not work for you

INOVATION_SH:
How to Change the direction of a DC motor in arduino uno?

How are we supposed to know how you have connected the motor and the Arduino? If you have connected the positive lead to one digital pin, and the negative lead to ground, you can forget about changes in direction. And, unless it is a VERY tiny motor, you are damaging the Arduino.

If you have connected the positive lead to 5V and negative lead to a digital pin, you can forget about direction control. And, unless it is a VERY tiny motor, you are damaging the Arduino.

If you have connected the positive lead to a digital pin, and the negative lead to a different digital pin, AND it is a VERY tiny motor, you can make it run one way by setting one pin HIGH and the other LOW. Make it run the other way by swapping which pin is HIGH. If both pins are HIGH or LOW, the motor will stop.

If you have a motor shield, as you SHOULD, the damned instructions that came with it will explain how to use it to control direction, and you should have read them.