625Views3Replies

Author Options:

Arduino, Can anyone help with a servo program for arduino? Answered

What I need is that at power up the servo should start at a center point then wait 15 sec then sweep left once return to center wait 15 sec then sweep right wait 3 sec then sweep right again then return to center. I also would like for this to only run once at start up and not again till the arduino is powerd up the next time. I'm new to arduino and have been trying the write the code without luck. I am using the Arduino Uno (SMD Edition).

Thank you for any help,
Greg


Discussions

0
None
steveastrouk

7 years ago

I answered it for you last week, but you seem to have deleted the question and my answer. Use the arduino servo library here
There is a worked example of a sweep, which is all you need. Use the delay function to get your timing, and at the end of the sweep left/right action, add a while loop that never terminates like while true {}; Steve

0
None
wirenut1980steveastrouk

Answer 7 years ago

Thank you for answering twice. I'm still working out the bugs in learning the arduino and posting here on instructables.com