Go Down

Topic: Forwards, stop, and backwards control of 10V DC motor (Read 2488 times) previous topic - next topic


So I have a 10 volt motor that im running, and I created my own H bridge with nMos and pMos transistors.  You run the motor in one direction by calling High1 Low2 for forward and High2 Low1 for backward.  My objective seems pretty simple: to run the DC motor in one direction for a certain period of time, say 1000 ms, stop for 1000 ms, and reverse for 1000 ms, where it will then come to a permanent stop.  And I am trying to trigger this action by using a 6mm x 6mm tact switch.  For the life of me, I cannot get this code to work.  If been working with an If statement by identifying the signal coming from the switch, but the motor does not want to cooperate with me from there.  Any ideas?


My GitHub:


Go Up