Making DC motor go in reverse, stop, and start without a switch


hello,
      wanted know if there code allow to:
1: turn on dc motor
2: put in reverse
3: stop motor
i don't want entire code, lines above stated things. not want use switch if possible. online everywhere uses switch. prefer not use variable resistor.
               again, don't want entire code, can figure out on own, commands this. alternatively, if know source point me in right direction helpful well.
                                                                                                                                thank you,
                                                                                                                                         chase

what motor?  there aren't many motors can drive directly off arduino pin.  pins can't handle current.  use transistor turn motor on , off, not reverse it.  can use array of transistors build h-bridge, simpler , cheaper buy one. 

there's no way round if want able drive motor both directions. 


Arduino Forum > Using Arduino > Programming Questions > Making DC motor go in reverse, stop, and start without a switch


arduino

Comments