Servo Motor
In this project, you'll learn how to connect and control a servo motor with the Arduino. A servo motor can be used to control the head or arm movements of a robot.
A standard servo motor is capable of rotating only half a circle (from 0 degree to 180 degree) in increments of one degree.
The Servo.h system library contains all of the functions for controlling the servo motor.
Parts needed:
|
| |
| 1 | Making the connections
The servo motor has three connection wires: brown, red and orange.
|
|
| 2 | Create a new program and type in the code on the right. | |
|
The The The The |
| |
| 3 | Run the program and you should see the servo motor first turn to one side and then to the other side. | |