File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 5151
5252"""
5353
54- # imports
55-
56- __version__ = "0.0.0-auto.0"
57- __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MotorKit.git"
5854
5955import board
60- import busio
6156from adafruit_pca9685 import PCA9685
6257
58+ __version__ = "0.0.0-auto.0"
59+ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MotorKit.git"
60+
6361
6462class MotorKit :
6563 """Class representing an Adafruit DC & Stepper Motor FeatherWing, Shield or Pi Hat kit.
6664
6765 Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi."""
68- def __init__ (self , address = 0x60 ):
66+ def __init__ (self , address = 0x60 , i2c = None ):
6967 self ._motor1 = None
7068 self ._motor2 = None
7169 self ._motor3 = None
7270 self ._motor4 = None
7371 self ._stepper1 = None
7472 self ._stepper2 = None
75- i2c = busio .I2C (board .SCL , board .SDA )
73+ if i2c is None :
74+ i2c = board .I2C ()
7675 self ._pca = PCA9685 (i2c , address = address )
7776 self ._pca .frequency = 1600
7877
You can’t perform that action at this time.
0 commit comments