Programme to Set PWM Outputs

import Adafruit_PCA9685 # Import the PCA9685 module.

pwm = Adafruit_PCA9685.PCA9685() # Initialise the PCA9685 using the default address (0x40).
# Alternatively specify a different address and/or bus:
#pwm = Adafruit_PCA9685.PCA9685(address=0x41, busnum=2)

# Configure min and max servo pulse lengths
servo_min = 150 # Min pulse length out of 4096
servo_max = 600 # Max pulse length out of 4096

# Set frequency to 60hz, good for servos.
pwm.set_pwm_freq(60)

print('Moving servo on channel x, press Ctrl-C to quit...')

servo = input ('enter servo number: ')

while True:
 pos = input ('Enter Pos 150 - 375 - 600: ')
 if pos < servo_min:
 pos = servo_min
 if pos > servo_max:
 pos = servo_max
 pwm.set_pwm(servo, 0, pos)