Simple test

Ensure your device works with this simple test.

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