š¹ Step 1: Components Needed
ā
Microcontroller ā Arduino Nano/Uno
ā
Servo Motor ā SG90 (small) or MG996R (stronger)
ā
Power Supply ā 5V (for servos)
ā
Potentiometer (optional) ā For manual control
ā
Jumper Wires & Breadboard
š¹ Step 2: Circuit Connection
| Arduino Pin | SG90 |
|---|---|
| 5V | Red (VCC) |
| GND | Brown (GND) |
| Pin 9 (PWM) | Orange (Signal) |

š¹ Step 3: Code for Basic Servo Control
If using Arduino, you can use the standard Servo.h library.
š¹ Code for Arduino (Basic Servo Movement)
#include <Servo.h>
Servo myServo;
void setup() {
myServo.attach(9); // Servo connected to Pin 9
}
void loop() {
myServo.write(0);
delay(1000);
myServo.write(90);
delay(1000);
myServo.write(180);
delay(1000);
}
š¹ Step 4: Upload Code
š Just upload via USB
š¹ Whatās Next?
ā Once you get the servo moving, we can:
- Add a second servo for more movement
- Use a potentiometer for manual control
- Start designing a simple robotic leg or arm