I’m not sure if this is the right place to detail my problems, but it seems like a good place to start.
Connected up my pan-tilt system fine.
Used Pimoroni Dashboard to install the pan-tilt library etc. See below:
Checking environment…
…
Checking hardware requirements…
I2C already enabled
Checking packages required by I2C interface…
…Python 2 smbus installed and up-to-date
…Python 3 smbus installed and up-to-date
Pan-Tilt HAT comes with examples and documentation that you may wish to install.
Performing a full install will ensure those resources are installed,
along with all required dependencies. It may however take a while!
Checking for dependencies…
Installing python-pantilthat…
…install ok installed
…Installing python3-pantilthat…
install ok installed
Checking for additional software…
python-picamera is already installed
python3-picamera is already installed
Downloading examples and documentation…
The examples directory already exists on your system!
We’ve backed them up as examples-backup, just in case you’ve changed anything!
Resources for your Pan-Tilt HAT were copied to
/home/pi/Pimoroni/pantilthat
All done. Enjoy your Pan-Tilt HAT!
Press Enter to continue…
I loaded smooth.py into Thonny to run from there.
These is the error
Traceback (most recent call last):
File “/home/pi/Pimoroni/pantilthat/examples/smooth.py”, line 6, in
import pantilthat
File “/usr/lib/python3/dist-packages/pantilthat/init.py”, line 15, in
pantilthat = PanTilt(i2c_bus=SMBus(1))
File “/usr/lib/python3/dist-packages/pantilthat/pantilt.py”, line 63, in init
self._set_config()
File “/usr/lib/python3/dist-packages/pantilthat/pantilt.py”, line 100, in _set_config
self._i2c_write_byte(self.REG_CONFIG, config)
File “/usr/lib/python3/dist-packages/pantilthat/pantilt.py”, line 191, in _i2c_write_byte
raise IOError(“Failed to write byte”)
OSError: Failed to write byte
Any ideas?
Note that I’ve been able to get Adafruit BME280 I2C Temperature Humidity Pressure Sensor to function either.
Is it possible there’s a problem with the I2C interface on my RPi 3?
Although I haven’t done loads of stuff with the RPi so far, everything else (not I2C related) seems to work.
Hope you can help…