diff --git a/adafruit_pca9685.py b/adafruit_pca9685.py index e21af41..b81e7db 100755 --- a/adafruit_pca9685.py +++ b/adafruit_pca9685.py @@ -160,7 +160,8 @@ def frequency(self, freq): self.prescale_reg = prescale # Prescale self.mode1_reg = old_mode # Mode 1 time.sleep(0.005) - self.mode1_reg = old_mode | 0xA1 # Mode 1, autoincrement on + # Mode 1, autoincrement on, fix to stop pca9685 from accepting commands at all addresses + self.mode1_reg = old_mode | 0xA0 def __enter__(self): return self diff --git a/examples/pca9685_servo.py b/examples/pca9685_servo.py index 465a023..565f273 100644 --- a/examples/pca9685_servo.py +++ b/examples/pca9685_servo.py @@ -3,13 +3,13 @@ from board import SCL, SDA import busio -# Import the PCA9685 module. -from adafruit_pca9685 import PCA9685 - # This example also relies on the Adafruit motor library available here: # https://github.com/adafruit/Adafruit_CircuitPython_Motor from adafruit_motor import servo +# Import the PCA9685 module. +from adafruit_pca9685 import PCA9685 + i2c = busio.I2C(SCL, SDA) # Create a simple PCA9685 class instance.