servokit_simpletest.py
1 """Simple test for a standard servo on channel 0 and a continuous rotation servo on channel 1.""" 2 import time 3 from adafruit_servokit import ServoKit 4 5 # Set channels to the number of servo channels on your kit. 6 # 8 for FeatherWing, 16 for Shield/HAT/Bonnet. 7 kit = ServoKit(channels=8) 8 9 kit.servo[0].angle = 180 10 kit.continuous_servo[1].throttle = 1 11 time.sleep(1) 12 kit.continuous_servo[1].throttle = -1 13 time.sleep(1) 14 kit.servo[0].angle = 0 15 kit.continuous_servo[1].throttle = 0