Control a servo motor with your Arduino and a potentiometer.

The housing of a servomotor contains an electric motor, an electronic control unit to determine the position, and a gear system for high performance. The servo axis can be rotated to 180°.

The servo motor has a cable with three wires. The red wire in the middle must be connected to the +5 V, the brown (or black) to GND and the orange (or yellow) to a digital pin on the Arduino. It is important to connect the servo correctly, otherwise it will be damaged.