In ths project you can learn how to build a servo controleer motor with the ATMEGA328 board. The position of the servo motor is controlled by the software (sweep back and forth) or by a potentiometer.
Schematic and board layout for sweep function
Read more:servo motor controller