As already mentioned in this question Reading and writing with smbus package, there are chips that, apart for standard SDA and SCL lines, use a third communication line. This means that this "modified" I2C communication cannot be made using standard kernel and
smbus library, which advantage is that communication is very orderly (perfect SCL pulses).
I already managed to bitbang communication using
RPi.GPIO library. The communication works, but it is uneven and each clock pulse has different length, since
RPi.GPIO library (and probably
Python itself) is just too slow.
Now I want to write my own library for the communication with the chip. In order for library to work properly, I have to solve two problems:
Would it be appropriate to use standard I2C Raspberry Pi pins (GPIO2, GPIO3) plus one arbitrary GPIO for that? Maybe this is not good idea because it might create a conflict with kernel and
smbuslibrary? What do you think?
How should I write this communication to be as orderly as possible - should I write special
Croutines within my
Pythonprogram and what commands should I use to access the GPIOs?
I would prefer stand-alone solutions that don't use existing communication libraries (e.g.
pigpio), since they contain a lot of capabilities completely unnecessary for the problem.