Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4974

Interfacing (DSI, CSI, I2C, etc.) • Re: I2C buses seen with i2cdetect, second bus not seen by python

$
0
0
Thank you for the detailed explanation, it's helped me focus my investigation. As far as I can see, there's nothing going wrong in the I2C subsystem setup, but the Python libraries do not recognize the pins I've used for the secondary bus as being valid interfaces to an I2C bus.

i2cdetect, i2cdump, I can always locate both buses and recognize both the RTC and the amplifier.

Now, by commenting out the lines:

Code:

# dtparam=i2c_arm=on# dtoverlay=i2c-rtc,ds1307,addr=0x68
I still cannot find the amplifier on bus 4. However, if I set my dtoverlay for the amplifier to bus 1, I can command it. Strangely, though, my debugging indicates that Python thinks it's talking to that device on pins 2 and 3, which is not where the amplifier bus is attached. I'm wondering now whether Python is trying to send to the hidden bus-1 where the RTC is located, and maybe my testing of the amplifier on/off status was not as thorough as I believed.
In any case, the issue still appears to be that Python does not see an I2C bus on pins 5 and 6, while i2cdetect does. I wondered if there was some initialization I had to do to cause Python to search more broadly, either in Python itself, or in some kernel module.
I guess for now, I should delve into the innards of those Python libraries to see if I can deduce what is getting in the way. There's nothing in dmesg to help.
Whatever I figure out, I'll follow-up here to keep the documentation going.

Statistics: Posted by christopher35 — Tue May 14, 2024 12:31 am



Viewing all articles
Browse latest Browse all 4974

Trending Articles