Servo Motor
- Servo.Set(pin, degree) - Sets servo motor connected to pin to a specific position
pin: Pin number. Pin 5 and 6 supported by hardware PWM which is more accurate than other pins
degree: 0 to 180
while True:
duelink.Servo.Set(7, 0)
time.sleep(1)
duelink.Servo.Set(7, 45)
time.sleep(1)
duelink.Servo.Set(7, 90)
time.sleep(1)
duelink.Servo.Set(7, 135)
time.sleep(1)
duelink.Servo.Set(7, 180)
time.sleep(1)
Tip
Many servo motors need 5V to work.