Skip to content

Commit 46a094b

Browse files
authored
Merge pull request #38 from adafruit/REUSE
Ran pre-commit, added licenses
2 parents 7364172 + ce903ae commit 46a094b

30 files changed

+645
-109
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
*.mpy
26
.idea
37
__pycache__
@@ -8,4 +12,4 @@ bundles
812
*.DS_Store
913
.eggs
1014
dist
11-
**/*.egg-info
15+
**/*.egg-info

.pylintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
[MASTER]
26

37
# A comma-separated list of package or module names from where C extensions may

.readthedocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
python:
26
version: 3
37
requirements_file: requirements.txt

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
4+
SPDX-License-Identifier: CC-BY-4.0
5+
-->
6+
17
# Adafruit Community Code of Conduct
28

39
## Our Pledge
@@ -43,7 +49,7 @@ Examples of unacceptable behavior by participants include:
4349

4450
The goal of the standards and moderation guidelines outlined here is to build
4551
and maintain a respectful community. We ask that you don’t just aim to be
46-
"technically unimpeachable", but rather try to be your best self.
52+
"technically unimpeachable", but rather try to be your best self.
4753

4854
We value many things beyond technical expertise, including collaboration and
4955
supporting others within our community. Providing a positive experience for
@@ -74,9 +80,9 @@ You may report in the following ways:
7480
In any situation, you may send an email to <support@adafruit.com>.
7581

7682
On the Adafruit Discord, you may send an open message from any channel
77-
to all Community Moderators by tagging @community moderators. You may
78-
also send an open message from any channel, or a direct message to
79-
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
83+
to all Community Moderators by tagging @community moderators. You may
84+
also send an open message from any channel, or a direct message to
85+
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
8086
@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175.
8187

8288
Email and direct message reports will be kept confidential.

LICENSES/CC-BY-4.0.txt

Lines changed: 324 additions & 0 deletions
Large diffs are not rendered by default.

LICENSES/CC-BY-SA-4.0.txt

Lines changed: 108 additions & 0 deletions
Large diffs are not rendered by default.

LICENSES/MIT.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License Copyright (c) <year> <copyright holders>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice (including the next
11+
paragraph) shall be included in all copies or substantial portions of the
12+
Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19+
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSES/Unlicense.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
4+
this software, either in source code form or as a compiled binary, for any
5+
purpose, commercial or non-commercial, and by any means.
6+
7+
In jurisdictions that recognize copyright laws, the author or authors of this
8+
software dedicate any and all copyright interest in the software to the public
9+
domain. We make this dedication for the benefit of the public at large and
10+
to the detriment of our heirs and successors. We intend this dedication to
11+
be an overt act of relinquishment in perpetuity of all present and future
12+
rights to this software under copyright law.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
19+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information,
20+
please refer to <https://unlicense.org/>

README.rst.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
3+
SPDX-License-Identifier: MIT

adafruit_motorkit.py

Lines changed: 82 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
1-
# The MIT License (MIT)
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft for Adafruit Industries
2+
# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries
23
#
3-
# Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
4-
# Copyright (c) 2018 Kattni Rembor for Adafruit Industries
5-
#
6-
# Permission is hereby granted, free of charge, to any person obtaining a copy
7-
# of this software and associated documentation files (the "Software"), to deal
8-
# in the Software without restriction, including without limitation the rights
9-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
# copies of the Software, and to permit persons to whom the Software is
11-
# furnished to do so, subject to the following conditions:
12-
#
13-
# The above copyright notice and this permission notice shall be included in
14-
# all copies or substantial portions of the Software.
15-
#
16-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
# THE SOFTWARE.
4+
# SPDX-License-Identifier: MIT
5+
236
"""
247
`adafruit_motorkit`
258
====================================================
@@ -61,10 +44,10 @@
6144
class MotorKit:
6245
"""Class representing an Adafruit DC & Stepper Motor FeatherWing, Shield or Pi Hat kit.
6346
64-
Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi if no I2C bus
65-
is supplied.
47+
Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi if no I2C bus
48+
is supplied.
6649
67-
Alternately, if using with multiple I2C devices, you can specify the I2C bus."""
50+
Alternately, if using with multiple I2C devices, you can specify the I2C bus."""
6851

6952
def __init__(
7053
self, address=0x60, i2c=None, steppers_microsteps=16, pwm_frequency=1600
@@ -110,129 +93,129 @@ def _motor(self, motor_name, channels, stepper_name):
11093
def motor1(self):
11194
""":py:class:``~adafruit_motor.motor.DCMotor`` controls for motor 1.
11295
113-
The following image shows the location of the M1 terminal on the DC/Stepper FeatherWing.
114-
The label on the FeatherWing is found on the bottom of the board.
115-
The terminal is labeled on the top of the Shield and Pi Hat.
96+
The following image shows the location of the M1 terminal on the DC/Stepper FeatherWing.
97+
The label on the FeatherWing is found on the bottom of the board.
98+
The terminal is labeled on the top of the Shield and Pi Hat.
11699
117-
.. image :: ../docs/_static/motor_featherwing/m1.jpg
118-
:alt: Motor 1 location
100+
.. image :: ../docs/_static/motor_featherwing/m1.jpg
101+
:alt: Motor 1 location
119102
120-
This example moves the motor forwards for one fifth of a second at full speed.
103+
This example moves the motor forwards for one fifth of a second at full speed.
121104
122-
.. code-block:: python
105+
.. code-block:: python
123106
124-
import time
125-
from adafruit_motorkit import motorkit
107+
import time
108+
from adafruit_motorkit import motorkit
126109
127-
kit = MotorKit()
110+
kit = MotorKit()
128111
129-
kit.motor1.throttle = 1.0
130-
time.sleep(0.2)
112+
kit.motor1.throttle = 1.0
113+
time.sleep(0.2)
131114
132-
kit.motor1.throttle = 0
115+
kit.motor1.throttle = 0
133116
"""
134117
return self._motor(1, (8, 9, 10), 1)
135118

136119
@property
137120
def motor2(self):
138121
""":py:class:``~adafruit_motor.motor.DCMotor`` controls for motor 2.
139122
140-
The following image shows the location of the M2 terminal on the DC/Stepper FeatherWing.
141-
The label on the FeatherWing is found on the bottom of the board.
142-
The terminal is labeled on the top of the Shield and Pi Hat.
123+
The following image shows the location of the M2 terminal on the DC/Stepper FeatherWing.
124+
The label on the FeatherWing is found on the bottom of the board.
125+
The terminal is labeled on the top of the Shield and Pi Hat.
143126
144-
.. image :: ../docs/_static/motor_featherwing/m2.jpg
145-
:alt: Motor 2 location
127+
.. image :: ../docs/_static/motor_featherwing/m2.jpg
128+
:alt: Motor 2 location
146129
147-
This example moves the motor forwards for one fifth of a second at full speed.
130+
This example moves the motor forwards for one fifth of a second at full speed.
148131
149-
.. code-block:: python
132+
.. code-block:: python
150133
151-
import time
152-
from adafruit_motorkit import motorkit
134+
import time
135+
from adafruit_motorkit import motorkit
153136
154-
kit = MotorKit()
137+
kit = MotorKit()
155138
156-
kit.motor2.throttle = 1.0
157-
time.sleep(0.2)
139+
kit.motor2.throttle = 1.0
140+
time.sleep(0.2)
158141
159-
kit.motor1.throttle = 0
142+
kit.motor1.throttle = 0
160143
"""
161144
return self._motor(2, (13, 11, 12), 1)
162145

163146
@property
164147
def motor3(self):
165148
""":py:class:``~adafruit_motor.motor.DCMotor`` controls for motor 3.
166149
167-
The following image shows the location of the M2 terminal on the DC/Stepper FeatherWing.
168-
The label on the FeatherWing is found on the bottom of the board.
169-
The terminal is labeled on the top of the Shield and Pi Hat.
150+
The following image shows the location of the M2 terminal on the DC/Stepper FeatherWing.
151+
The label on the FeatherWing is found on the bottom of the board.
152+
The terminal is labeled on the top of the Shield and Pi Hat.
170153
171-
.. image :: ../docs/_static/motor_featherwing/m3.jpg
172-
:alt: Motor 3 location
154+
.. image :: ../docs/_static/motor_featherwing/m3.jpg
155+
:alt: Motor 3 location
173156
174-
This example moves the motor forwards for one fifth of a second at full speed.
157+
This example moves the motor forwards for one fifth of a second at full speed.
175158
176-
.. code-block:: python
159+
.. code-block:: python
177160
178-
import time
179-
from adafruit_motorkit import motorkit
161+
import time
162+
from adafruit_motorkit import motorkit
180163
181-
kit = MotorKit()
164+
kit = MotorKit()
182165
183-
kit.motor3.throttle = 1.0
184-
time.sleep(0.2)
166+
kit.motor3.throttle = 1.0
167+
time.sleep(0.2)
185168
186-
kit.motor1.throttle = 0
169+
kit.motor1.throttle = 0
187170
"""
188171
return self._motor(3, (2, 3, 4), 2)
189172

190173
@property
191174
def motor4(self):
192175
""":py:class:``~adafruit_motor.motor.DCMotor`` controls for motor 4.
193176
194-
.. image :: ../docs/_static/motor_featherwing/m4.jpg
195-
:alt: Motor 4 location
177+
.. image :: ../docs/_static/motor_featherwing/m4.jpg
178+
:alt: Motor 4 location
196179
197-
This example moves the motor forwards for one fifth of a second at full speed.
180+
This example moves the motor forwards for one fifth of a second at full speed.
198181
199-
.. code-block:: python
182+
.. code-block:: python
200183
201-
import time
202-
from adafruit_motorkit import motorkit
184+
import time
185+
from adafruit_motorkit import motorkit
203186
204-
kit = MotorKit()
187+
kit = MotorKit()
205188
206-
kit.motor4.throttle = 1.0
207-
time.sleep(0.2)
189+
kit.motor4.throttle = 1.0
190+
time.sleep(0.2)
208191
209-
kit.motor1.throttle = 0
192+
kit.motor1.throttle = 0
210193
"""
211194
return self._motor(4, (7, 5, 6), 2)
212195

213196
@property
214197
def stepper1(self):
215198
""":py:class:``~adafruit_motor.stepper.StepperMotor`` controls for one connected to stepper
216-
1 (also labeled motor 1 and motor 2).
199+
1 (also labeled motor 1 and motor 2).
217200
218-
The following image shows the location of the stepper1 terminals on the DC/Stepper
219-
FeatherWing. stepper1 is made up of the M1 and M2 terminals.
220-
The labels on the FeatherWing are found on the bottom of the board.
221-
The terminals are labeled on the top of the Shield and Pi Hat.
201+
The following image shows the location of the stepper1 terminals on the DC/Stepper
202+
FeatherWing. stepper1 is made up of the M1 and M2 terminals.
203+
The labels on the FeatherWing are found on the bottom of the board.
204+
The terminals are labeled on the top of the Shield and Pi Hat.
222205
223-
.. image :: ../docs/_static/motor_featherwing/stepper1.jpg
224-
:alt: Stepper 1 location
206+
.. image :: ../docs/_static/motor_featherwing/stepper1.jpg
207+
:alt: Stepper 1 location
225208
226-
This example moves the stepper motor 100 steps forwards.
209+
This example moves the stepper motor 100 steps forwards.
227210
228-
.. code-block:: python
211+
.. code-block:: python
229212
230-
from adafruit_motorkit import MotorKit
213+
from adafruit_motorkit import MotorKit
231214
232-
kit = MotorKit()
215+
kit = MotorKit()
233216
234-
for i in range(100):
235-
kit.stepper1.onestep()
217+
for i in range(100):
218+
kit.stepper1.onestep()
236219
"""
237220
if not self._stepper1:
238221
from adafruit_motor import ( # pylint: disable=import-outside-toplevel
@@ -257,26 +240,26 @@ def stepper1(self):
257240
@property
258241
def stepper2(self):
259242
""":py:class:``~adafruit_motor.stepper.StepperMotor`` controls for one connected to stepper
260-
2 (also labeled motor 3 and motor 4).
243+
2 (also labeled motor 3 and motor 4).
261244
262-
The following image shows the location of the stepper2 terminals on the DC/Stepper
263-
FeatherWing. stepper2 is made up of the M3 and M4 terminals.
264-
The labels on the FeatherWing are found on the bottom of the board.
265-
The terminals are labeled on the top of the Shield and Pi Hat.
245+
The following image shows the location of the stepper2 terminals on the DC/Stepper
246+
FeatherWing. stepper2 is made up of the M3 and M4 terminals.
247+
The labels on the FeatherWing are found on the bottom of the board.
248+
The terminals are labeled on the top of the Shield and Pi Hat.
266249
267-
.. image :: ../docs/_static/motor_featherwing/stepper2.jpg
268-
:alt: Stepper 2 location
250+
.. image :: ../docs/_static/motor_featherwing/stepper2.jpg
251+
:alt: Stepper 2 location
269252
270-
This example moves the stepper motor 100 steps forwards.
253+
This example moves the stepper motor 100 steps forwards.
271254
272-
.. code-block:: python
255+
.. code-block:: python
273256
274-
from adafruit_motorkit import MotorKit
257+
from adafruit_motorkit import MotorKit
275258
276-
kit = MotorKit()
259+
kit = MotorKit()
277260
278-
for i in range(100):
279-
kit.stepper2.onestep()
261+
for i in range(100):
262+
kit.stepper2.onestep()
280263
"""
281264
if not self._stepper2:
282265
from adafruit_motor import ( # pylint: disable=import-outside-toplevel

docs/_static/favicon.ico.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2018 Phillip Torrone for Adafruit Industries
2+
3+
SPDX-License-Identifier: CC-BY-4.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: CC-BY-SA-4.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: CC-BY-SA-4.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: CC-BY-SA-4.0

0 commit comments

Comments
 (0)