12 lines
288 B
Python
12 lines
288 B
Python
import time
|
|
from adafruit_servokit import ServoKit
|
|
|
|
kit = ServoKit(channels=16)
|
|
kit.servo[12].set_pulse_width_range(1000, 2000)
|
|
|
|
kit.servo[12].actuation_range = 200
|
|
while True:
|
|
channel = int(input("Channel:\n"))
|
|
pos = int(input("Position: \n"))
|
|
kit.servo[channel].angle = pos
|