代碼在此
其他以后更
#!usr/bin/env python
#encoding: utf8
from __future__ import division
import time
import Adafruit_PCA9685
pwm = Adafruit_PCA9685.PCA9685()
# Configure min and max servo pulse lengths
servo_min = 70 # Min pulse length out of 4096
servo_max = 800 # Max pulse length out of 4096
# Set frequency to 60hz, good for servos.
pwm.set_pwm_freq(60)
# Move servo on channel O between extremes.