Sorry about that. Accidentally pressed "Post" and it looks like the only way to "edit" a post is to delete it and repost.
Anyway, based on that README and what others have written around the web, I found the following to be sufficient to enable /dev/i2c-0:
- Append to /boot/config.txt the following line: dtparam=i2c_vc=on
I had to make the following change in the code to get the Lepton to run on /dev/i2c-0. Note that this changes the Lepton to run exclusively on /dev/i2c-0; eventually I want to be able to run two Leptons, one on each I2C bus.
- In LeptonModule/software/raspberrypi_libs/leptonSDKEmb32PUB, make the following change to raspi_I2C.c:
- In the function DEV_I2C_MasterInit, in the line that says leptonDevice = open("/dev/i2c-1", O_RDWR); change "/dev/i2c-1" to "/dev/i2c-0"
- You'll need to change this back to i2c-1 if you want to interface with a camera
- This is a nasty workaround and should probably be made more flexible in the source code. I'm opening an issue on Github for a better solution.
- In your equivalent to LeptonSPI.cpp (which can be found in the directory raspberrypi_video), change the following:
- Whenever you call LEP_OpenPort, make sure you change the first argument from 1 to 0.
And, of course, make sure that the Lepton's SDA is plugged into the Pi's ID_SD (pin 27), and that the Lepton's SCL is plugged into the Pi's ID_SC (pin 28).