A Servo Motor is a precision motor that can rotate to a specific angle (0-180 degrees for standard servos). They are used everywhere: robotic arms, RC cars, camera gimbals, and more.
Servos use a PWM (Pulse Width Modulation) signal to determine their position.
The Arduino Servo library handles all this for you!
| Servo Wire | Arduino Pin | | :--- | :--- | | Brown/Black (GND) | GND | | Red (VCC) | 5V (or external for high-torque) | | Orange/Yellow (Signal) | Any PWM pin (e.g., D9) |
```cpp #include <Servo.h> Servo myServo;
void setup() { myServo.attach(9); // Attach to pin 9 }
void loop() { myServo.write(0); // Go to 0 degrees delay(1000); myServo.write(90); // Go to 90 degrees delay(1000); myServo.write(180); // Go to 180 degrees delay(1000); } ```
Explore our collection of DIY kits and components. All project components mentioned in this guide are available in our store.
Browse All Projects