How can I make a motor stop upon input from a sensor?
sciguy
Posts: 48
Hello all, kinda new to PBASIC, and I just had a quick question. What command would I use to make the basic stamp run a motor until something else happened, and then stop? What comand would encompass this? thanks!
-Jeremy
[noparse][[/noparse]subject added]
Post Edited (sciguy) : 1/31/2007 11:25:21 PM GMT
-Jeremy
[noparse][[/noparse]subject added]
Post Edited (sciguy) : 1/31/2007 11:25:21 PM GMT
Comments
That really depends on how the motor is connected to the BASIC Stamp, but could be as simple as a HIGH x to start it and a LOW x to stop it (where x is the I/O pin). You cannot connect the motor directly to the I/O pins, so how do you have it connected?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Are you sure you’re not using servos? Motors cannot connect directly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
FOR counter = 1 TO 100
PULSOUT 14, 1000
PAUSE 5
NEXT
the variable for force is "rawForce"
basically, i want it to stop the motor when the force exceeds zero.