so let's pin 2 start button , pin 3 stop buton. there way make servo stop @ possible time?
for example servo programmed go 0 180 in loop when press start. want servo stop @ location when stop button pressed ( position between 0 , 180)
when start button pressed again wil continue @ moment stopped , when reset pushed wil go 0 , wait start until start pressed.
does know if possible , how can code it?
rolf,
for example servo programmed go 0 180 in loop when press start. want servo stop @ location when stop button pressed ( position between 0 , 180)
when start button pressed again wil continue @ moment stopped , when reset pushed wil go 0 , wait start until start pressed.
does know if possible , how can code it?
rolf,
absolutely possible. have make sure reading button in loop sweeps servo. there several examples come ide may figure out. @ "state change" example , "servo sweep" example. you need modify servo sweep sweeping servo checking button. if button pressed, break out of loop break command.
Arduino Forum > Using Arduino > Programming Questions > Is there a way to stop a servo at any time?
arduino
Comments
Post a Comment