tobyw_1969
New Member
I have a small 2v geared motor which I want to move one way or another depending on user input.
Is there a reason why I can't connect the + and - connections to pins 0 and 1 of a picaxe and swap motor direction by setting the pins alternately high and low like this?
I tried it, and it sort of works, but sometimes it stops for a bit before continuing - so I am guessing this is not a good way to do this. But I don't know enough about the internal circuitry of the chip to know if I am going to fry it by wiring it up like this. My book suggests I need a specific servo driver to do this...isn't there an easier way to control motor direction from the PICaxe without using (and buying..) another IC?
Is there a reason why I can't connect the + and - connections to pins 0 and 1 of a picaxe and swap motor direction by setting the pins alternately high and low like this?
Code:
main:
high 1 ' go one way for 2 secs
low 0
pause 2000
high 0 ' go the other way for 2 secs
low 1
pause 2000
goto main