I just ran into a problem with the plugin that needed changing. I installed the ArduCam on my OctoPi and I was able to change the focus with the tools provided by Arducam, but I was getting
"Trouble accessing camera. I2C bus failure. Is camera plugged in?"
When trying to run "ArduCam Focus". I looked all over the place and then listed my i2c devices here:
$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 Mar 26 16:40 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Mar 26 16:40 /dev/i2c-1
crw-rw---- 1 root i2c 89, 10 Mar 26 16:40 /dev/i2c-10
crw-rw---- 1 root i2c 89, 11 Mar 26 16:40 /dev/i2c-11
And noticed there was nothing on /dev/i2c-0 and /dev/i2c-1 with the following command gave me those devices too.
$ i2cdetect -l
i2c-1 i2c bcm2835 (i2c@7e804000) I2C adapter
i2c-11 i2c bcm2835 (i2c@7e205000) I2C adapter
i2c-0 i2c i2c-11-mux (chan_id 0) I2C adapter
i2c-10 i2c i2c-11-mux (chan_id 1) I2C adapter
With the test.py program:
#!/usr/bin/env python
import smbus
import pprint
bus = smbus.SMBus(0)
pprint.pprint(bus);
bus.write_byte_data(0xc, 0x06, 0x40)
Did not work for me and I had to change the following line
from
bus = smbus.SMBus(0)
to
bus = smbus.SMBus(10)
I'm not sure what's on the 0 bus but it will not work for me. But after changing to bus "10", the test.py program works.
So I edited my
"/home/pi/oprint/lib/python3.7/site-packages/ArduCamFocus/__init__.py" script and changed the following
self.bus = smbus.SMBus(0)
to
self.bus = smbus.SMBus(10)
Now the "ArduCam Focus" plugin works great! I will be happy to work with you to share my Octopi's configs and anything else you need.