Controling a servomotor

In this lab, you’ll control a servomotor’s position using the value returned from an analog sensor. Servos are the easiest way to start making motion with a microcontroller. Even though they don’t turn 360 degrees, you can use them to create all sorts of periodic or reciprocating motions. Check out some of the Flying Pig mechanisms for ideas on how to make levers, cams, and other simple machines for making motion.