|
1 | | -# The MIT License (MIT) |
| 1 | +# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries |
2 | 2 | # |
3 | | -# Copyright (c) 2018 Kattni Rembor for Adafruit Industries |
4 | | -# |
5 | | -# Permission is hereby granted, free of charge, to any person obtaining a copy |
6 | | -# of this software and associated documentation files (the "Software"), to deal |
7 | | -# in the Software without restriction, including without limitation the rights |
8 | | -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
9 | | -# copies of the Software, and to permit persons to whom the Software is |
10 | | -# furnished to do so, subject to the following conditions: |
11 | | -# |
12 | | -# The above copyright notice and this permission notice shall be included in |
13 | | -# all copies or substantial portions of the Software. |
14 | | -# |
15 | | -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 | | -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 | | -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 | | -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 | | -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 | | -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
21 | | -# THE SOFTWARE. |
| 3 | +# SPDX-License-Identifier: MIT |
| 4 | + |
22 | 5 | """ |
23 | 6 | `adafruit_servokit` |
24 | 7 | ==================================================== |
|
59 | 42 | class ServoKit: |
60 | 43 | """Class representing an Adafruit PWM/Servo FeatherWing, Shield or Pi HAT and Bonnet kits. |
61 | 44 |
|
62 | | - Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi. |
| 45 | + Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi. |
63 | 46 |
|
64 | | - Initialise the PCA9685 chip at ``address``. |
| 47 | + Initialise the PCA9685 chip at ``address``. |
65 | 48 |
|
66 | | - The internal reference clock is 25MHz but may vary slightly with environmental conditions and |
67 | | - manufacturing variances. Providing a more precise ``reference_clock_speed`` can improve the |
68 | | - accuracy of the frequency and duty_cycle computations. See the ``calibration.py`` example in |
69 | | - the `PCA9685 GitHub repo <https://github.com/adafruit/Adafruit_CircuitPython_PCA9685>`_ for |
70 | | - how to derive this value by measuring the resulting pulse widths. |
| 49 | + The internal reference clock is 25MHz but may vary slightly with environmental conditions and |
| 50 | + manufacturing variances. Providing a more precise ``reference_clock_speed`` can improve the |
| 51 | + accuracy of the frequency and duty_cycle computations. See the ``calibration.py`` example in |
| 52 | + the `PCA9685 GitHub repo <https://github.com/adafruit/Adafruit_CircuitPython_PCA9685>`_ for |
| 53 | + how to derive this value by measuring the resulting pulse widths. |
71 | 54 |
|
72 | | - :param int channels: The number of servo channels available. Must be 8 or 16. The FeatherWing |
73 | | - has 8 channels. The Shield, HAT, and Bonnet have 16 channels. |
74 | | - :param int address: The I2C address of the PCA9685. Default address is ``0x40``. |
75 | | - :param int reference_clock_speed: The frequency of the internal reference clock in Hertz. |
76 | | - Default reference clock speed is ``25000000``. |
77 | | - :param int frequency: The overall PWM frequency of the PCA9685 in Hertz. |
78 | | - Default frequency is ``50``. |
| 55 | + :param int channels: The number of servo channels available. Must be 8 or 16. The FeatherWing |
| 56 | + has 8 channels. The Shield, HAT, and Bonnet have 16 channels. |
| 57 | + :param int address: The I2C address of the PCA9685. Default address is ``0x40``. |
| 58 | + :param int reference_clock_speed: The frequency of the internal reference clock in Hertz. |
| 59 | + Default reference clock speed is ``25000000``. |
| 60 | + :param int frequency: The overall PWM frequency of the PCA9685 in Hertz. |
| 61 | + Default frequency is ``50``. |
79 | 62 |
|
80 | 63 | """ |
81 | 64 |
|
|
0 commit comments