Hi,
We're using the Adafruit DC+Stepper Motor HAT and it is working fine until we attach an additional HAT (specifically this one). After attaching that HAT on top of the Adafruit one, and trying to run the example stepper code, we get this error:
File "/home/pi/.virtualenvs/plotter/lib/python3.7/site-packages/adafruit_pca9685.py", line 151, in frequencyreturn self.reference_clock_speed / 4096 / self.prescale_regZeroDivisionError: float division by zero
The following code throws that error:
import time
import board
from adafruit_motorkit import MotorKit
from adafruit_motor import stepper
kit = MotorKit(i2c=board.I2C())
for i in range(500):
print(kit.stepper1.onestep(style=stepper.DOUBLE))
time.sleep(0.05)
kit.stepper1.release()
it uses the same i2c address so you would have to change it on one of the hats. closing since it isn't a library issue. you can post in the forums for tech support
Hi, We're using the Adafruit DC+Stepper Motor HAT and it is working fine until we attach an additional HAT (specifically this one). After attaching that HAT on top of the Adafruit one, and trying to run the example stepper code, we get this error:
File "/home/pi/.virtualenvs/plotter/lib/python3.7/site-packages/adafruit_pca9685.py", line 151, in frequency
return self.reference_clock_speed / 4096 / self.prescale_reg
ZeroDivisionError: float division by zero
The following code throws that error:
Any help would be greatly appreciated.