Pan and tilt facetracking I/O error


#1

HI, I am super frustrated and have tried everything possible to get this running for a university project.
This is the post I’m following - https://learn.pimoroni.com/tutorial/electromechanical/building-a-pan-tilt-face-tracker

The error i’m getting after I ran everything is

pi@raspberrypi:~/PanTiltFacetracker $ sudo python ./facetracker.py
Traceback (most recent call last):
File “./facetracker.py”, line 4, in
from pantilt import *
File “/home/pi/PanTiltFacetracker/pantilt.py”, line 7, in
servo = PWM.PCA9685()
File “/usr/local/lib/python2.7/dist-packages/Adafruit_PCA9685/PCA9685.py”, line 75, in init
self.set_all_pwm(0, 0)
File “/usr/local/lib/python2.7/dist-packages/Adafruit_PCA9685/PCA9685.py”, line 111, in set_all_pwm
self._device.write8(ALL_LED_ON_L, on & 0xFF)
File “/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO/I2C.py”, line 114, in write8
self._bus.write_byte_data(self._address, register, value)
File “/usr/local/lib/python2.7/dist-packages/Adafruit_PureIO/smbus.py”, line 236, in write_byte_data
self._device.write(data)
IOError: [Errno 121] Remote I/O error

is there anything I’m doing wrong here? I’m so confused, I did everything step by step.


#2

I don’t have this pan tilt, but it sounds like the code tries to connect to a port that you didn’t connect.
Did you checked the wiring ?


#3

Are you using a PA9685 servo driver or a Pan Tilt HAT?


#4

Нет, я включаю любимую музыку в наушниках и отправляюсь в полёт. В то же самое время миксую её в голове. Спасибо.