Simple sweep beginner

You need to review the following thread which will show you how to make a none blocking Timer.

After you master how to make a Timer, then come up with a schematic showing how the project hardware is connected.

You should be aware servos should not be powered from the Arduino, they need their own power supply, probably 6VDC, this can be four AA batteries or a 5V @ 1 to 2Amp cell phone charger.

The servo power supply must share a common ground connection with the Arduino.


You can add a relay circuit to control the power to the servo.

Use this relay to disconnect the servo battery power when it is not needed to move will help extend the life of the batteries.