Hello, I am a beginner trying to figure out how to get a servo motor to rotate in one direction and then rotate the other way in a set amount of time. I was able to do that with LEDs but I'm not sure how to do it with a servo motor. I have searched all around google and was not able to find anything. Please help :))
Where does the 1 channel relay come in?
Post your "I was able to do that with LEDs" code (and tell us exactly how it relates to your requirement because I'm sure you didn't make LEDs rotate one way then the other).
If you really can't find anything about moving servos then the Servo Knob and particularly Sweep examples in the IDE should give you some useful ideas.
Steve
You have to many guessables to properly answer your question. I am assuming with LEDs you turned on on then the other, if so that code is close. You can connect those LED leads to an H bridge and connect the motor to that. But again there are lots of guessables! This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
jasoncoll10:
rotate the other way in a set amount of time
Can you also clarify "in"?
To me that means you decide how long it must take to go from a to b and back to a, then apportion the "clicks" out so it takes the right time.
But it's a bit ambig.
"Hello, I am a beginner trying to figure out how to get a servo motor to rotate in one direction and then rotate the other way in a set amount of time."
You might experiment with the delay times in the servo "sweep" example in the IDE examples.