---
title: "Pascal (@metrowizard) | Hashnode"
description: "Pascal (@metrowizard) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@metrowizard"
---

@metrowizard

# Pascal

@metrowizard · Joined November 2021

## Comments

[Gary Vladimir Núñez López Hi! Thanks for your answer. I just repeated the tutorial with the second library (--> Adafruit\_CircuitPython\_ServoKit). The same kind of error: Traceback (most recent call last): File "/home/pi/rover/Main.py", line 35, in <module> test.test() File "/home/pi/rover/Controllers/ServoController.py", line 12, in test 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 I expect you have nothing different running than the stock Raspian? What version of python do you use? Python3.10? I have Python3.7 on the Raspberry Pi, and I do not know how to upgrade it to 3.10... Your help would be VERY appreciated!](https://hashnode.com/posts/control-16-servos-with-raspberry-pi-pca9685-driver/615f4248b945c81a907cf1a0/comment/61a4f5319ac0d611876b215e#reply-61a8c3bb723c3a712ae10db4)

Reply · Article · Dec 2, 2021 · [Control 16 servos with Raspberry Pi + PCA9685 Driver](https://hashnode.com/posts/control-16-servos-with-raspberry-pi-pca9685-driver/615f4248b945c81a907cf1a0)

[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](https://hashnode.com/posts/control-16-servos-with-raspberry-pi-pca9685-driver/615f4248b945c81a907cf1a0/comment/61a4f5319ac0d611876b215e)

Comment · Article · Nov 29, 2021 · [Control 16 servos with Raspberry Pi + PCA9685 Driver](https://hashnode.com/posts/control-16-servos-with-raspberry-pi-pca9685-driver/615f4248b945c81a907cf1a0)
