w4mmp wrote: ↑
Wed Jan 22, 2020 4:22 pm
Thanks so much! Yes, adding dtoverlay=i2c5 to config.txt activated the i2c 5 buss. I2cdetect finds and reports the connected devices. Now to find an I2C library that handles buses other than the primary buss. I normally use an easy to use and well documented library offered by http://www.airspayce.com/mikem/bcm2835/
but I have my doubts I can use it without source code modification.
I really can not recommend using a userspace library that tries mapping the I2C registers directly and poking them. There is a kernel driver for the I2C peripheral for a reason - it provides a central place for all arbitration. If you use bcm2835 or similar from two applications then they will interfere with each other in very bad ways.
Having a quick look on the Google Group for that library, https://groups.google.com/forum/#!topic ... KqolkcDwKc
confirms exactly the same thing.
Memory says pigpio does use the kernel driver for I2C access so is probably a better bet. I'd expect i2cOpen
to take a bus number of 5 fairly happily.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.