Basic Servo Interfacing

A working design is not always a good design.

Read and implement per Mem's suggestion. Using delay() in a servo program is playing with fire. You must keep refresh() called frequently. A servo normally has to compare its position with the commanded position. If you go away for a second, it has nothing to compare to and stops moving!

Analog servo? Digital servo? Smoke & mirrors!