Update to code
Needs testing
This commit is contained in:
@@ -58,7 +58,7 @@ def software_reset(i2c=None, **kwargs):
|
||||
"""Sends a software reset (SWRST) command to all servo drivers on the bus."""
|
||||
# Setup I2C interface for device 0x00 to talk to all of them.
|
||||
if i2c is None:
|
||||
import Adafruit_GPIO.I2C as I2C
|
||||
import I2C as I2C
|
||||
i2c = I2C
|
||||
self._device = i2c.get_i2c_device(0x00, **kwargs)
|
||||
self._device.writeRaw8(0x06) # SWRST
|
||||
@@ -71,7 +71,7 @@ class PCA9685(object):
|
||||
"""Initialize the PCA9685."""
|
||||
# Setup I2C interface for the device.
|
||||
if i2c is None:
|
||||
import Adafruit_GPIO.I2C as I2C
|
||||
import I2C as I2C
|
||||
i2c = I2C
|
||||
self._device = i2c.get_i2c_device(address, **kwargs)
|
||||
self.set_all_pwm(0, 0)
|
||||
|
||||
Reference in New Issue
Block a user