Servo (Ledong)
Overview
Servo with a rotation range of 0-180 degrees, accepts precise control, and can rotate to a specified angle.
Technical Specifications
Operating voltage: VCC 3.3V -5V
Rotation angle: 0-180 degrees
Operating torque: 1.6KG/CM
Response speed: 0.12-0.13s/60 degrees
Pin Definition
Pin |
Definition |
|---|---|
Black (GND) |
Ground |
Red (VCC) |
Power |
Yellow (DI) |
Control signal input |
Example Code
Makes the servo oscillate left and right continuously.
from mpython import *
from servo import Servo
import time
servo_15 = Servo(15, min_us=500, max_us=2500, actuation_range=270)
while True:
servo_15.write_angle(60)
time.sleep(1)
servo_15.write_angle(120)
time.sleep(1)