Hi everyone. I am just new here in arduino stuff.
I have a small project which a servo motor being controlled by push buttons.
I have this 2 push buttons.
Button 1 -when being pressed, will turn the servo motor from 0 - 90 degrees and just stops there.
Button 2 -when being pressed, will turn the motor back from 90 - 0 degrees.
it works like something go up and down.
just like an toll gate, which it goes down and up.
Im just new here so please bare with me.
Your help will be much appreciated.
Thank you so much.
Waiting for your great response.
If you one one switch to rotate the servo one time, you need to look at the state change detection example. You want the action to occur only when the switch transitions from the released state to the pressed state. The transition from pressed to released should do nothing.