Hello,
using Ubuntu MATE 18.04 on a rPi 3B and trying to get ServoHat up and running. Following this tutorial:
https://learn.sparkfun.com/tutorials/pi … n-examples
I verified i2c is activated, and running i2c detect -y 1 shows 0x40 marked with a 40
Have a basic test program, that looks like:
import pi_servo_hat
import time
test = pi_servo_hat.PiServoHat()
test.restart()
when i run it I get the below error:
Traceback (most recent call last):
File "/home/pzpi/repos/hello_servo_world.py", line 4, in <module>
test=pi_servo_hat.PiServoHat()
File "/usr/local/lib/python2.7/dist-packages/pi_servo_hat.py", line 169, in __init__
self.set_pwm_frequency(_DEFAULT_SERVO_FREQUENCY)
File "/usr/local/lib/python2.7/dist-packages/pi_servo_hat.py", line 249, in set_pwm_frequency
if self.PCA9685.set_pre_scale(frequency) == True:
File "/usr/local/lib/python2.7/dist-packages/qwiic_pca9685.py", line 1301, in set_pre_scale
self._i2c.writeByte(self.address, PRE_SCALE, pwmPreScale)
File "/usr/local/lib/python2.7/dist-packages/qwiic_i2c/linux_i2c.py", line 226, in writeByte
return self.i2cbus.write_byte_data(address, commandCode, value)
File "/usr/local/lib/python2.7/dist-packages/smbus2/smbus2.py", line 454, in write_byte_data
msg.data.contents.byte = value
TypeError: int expected instead of float
clearly somewhere the wrong value is being passed, but not sure how to troubleshoot this as it seems the error is in the library provided? any help would be great, thank you!