Hmmm, I'm not sure what the problem is, but the battery I used was a 5V not a 9V, maybe that's the problem?, also I recommend you to check the wiring, and try with the second library.
Very nice tutorial, thanks! I followed your steps above and it has thrown this exception on run:
/bin/python /home/pi/rover/Adafruit_Python_PCA9685/examples/simpletest.py
Traceback (most recent call last):
File "/home/pi/rover/Adafruit_Python_PCA9685/examples/simpletest.py", line 56, in <module>
kit.servo[7].angle = 175
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_servokit.py", line 147, in __getitem__
servo = adafruit_motor.servo.Servo(self.kit._pca.channels[servo_channel])
File "/usr/local/lib/python3.7/dist-packages/adafruit_motor/servo.py", line 89, in __init__
super().__init__(pwm_out, min_pulse=min_pulse, max_pulse=max_pulse)
File "/usr/local/lib/python3.7/dist-packages/adafruit_motor/servo.py", line 29, in __init__
self.set_pulse_width_range(min_pulse, max_pulse)
File "/usr/local/lib/python3.7/dist-packages/adafruit_motor/servo.py", line 33, in set_pulse_width_range
self._min_duty = int((min_pulse * self._pwm_out.frequency) / 1000000 * 0xFFFF)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_pca9685.py", line 56, in frequency
return self._pca.frequency
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_pca9685.py", line 134, in frequency
return self.reference_clock_speed / 4096 / self.prescale_reg
ZeroDivisionError: float division by zero
Could you help me? Thanks a lot in advance Metrowizard
Great article!, I like the way you explained it, keep the good work :)
ISDP Group 6
I followed the steps, and the programme is able to execute without error, but no response from the servo. The external power for the PCA9685 is a 9V battery. I've checked the motor, and it's healthy. Any idea why the servo is not responding?