I have an adafruit pca9685 16-servo controller. I was using this guide to control it: https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/using-the-adafruit-library
Particularly my code looks something like the following
from adafruit_servokit import ServoKit
import time
kit = ServoKit(channels=16)
while True:
kit.servo[0].angle = 180
time.sleep(5)
kit.servo[0].angle = 0
time.sleep(5)
And that all works fine for me if GPIO 2&3 are connected to SDA & SCL respectively.
Now i wanted to get a little creative. I wanted to use GPIO 10 and 9 to control the servo board and have GPIO 2&3 be used somewhere else (it would make the wiring cleaner looking for me and generally I dont want to be stuck using "pin X" only for "purpose Y").
So I moved SDA & SCL to GPIO 9 & 10 respectively, but now my python code freaks out throwing:
"ValueError: No I2C Device at address: 0x40"
From the file "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py"
I did some research into this and the following website makes it seem as if GPIO 2&3 are the ONLY pins that can be used for I2C: https://pinout.xyz/pinout/i2c, but I wanted to confirm with the community if there is some work around to user other pins?
It is clear to me that I2C and adafruit by default are checking pins 2&3, seeing as (2,3) is never passed as an argument in my code, and I was hopeful that there might be a configuration file or setting that can be changed to support other pins.