Author Options:

servo controlled by arduino Answered

Hi everyone and thanks for looking.

I wanted to conrtol a servo using ardunio. This is what I want the servo to do,

I want to be able to flip a switch and have the servo move.
switch in "off" position, servo is at rest
flip the switch to "on" position, servo moves 90 degrees and holds
switch to "off" position, servo returns to rest position

I am just starting out with arduino and really didnt know what was need to acomplish this.

any help would be great.

Thanks in advanced


The forums are retiring in 2021 and are now closed for new topics and comments.

8 years ago

Go to www.arduino.cc to browse through the starter tutorials.

Install the sketch programming for the arduino on your pc.

Get your arduino set up with usb connected to the computer so you can download a sketch.

Get a switch working to control the onboard LED to go on and off.

Modify the sketch to add the coding to control the servo.  You should be able to use change the sample code from using a potentiometer to your switch.

Good luck.