We are using the ExpanderPI in combination with BME680 sensor for reading temperature and humidity. They both communicate through i2C and there are problems when we try to read data from both of them simultaneously. In case reading happens at the same time, error occurs: EIO, Input/output error.
Short summary of our system:
RaspberryPI is running software similar to "stopwatch". We have 3 physical buttons connected to ExpanderPI from where we control the stopwatch. To detect the button changes (since there are no interrupt callbacks available), we are using a interval of 200ms to check for button presses all the time, which works nicely. The problem is when we try to read from BME sensor at some interval (10 seconds e.g), that's when the error above shows. If we comment / remove ExpanderPI code from the software and only leave BME running, it works normally.
After some investigating we noticed both libraries are using different i2c libraries in the back - could this maybe be the cause? Also couldn't notice anywhere in the libraries that the connections are getting closed at any point in time. Does this somehow "reserve" the i2C communication for let's say ExpanderPI library only, which then makes it impossible for BME's library to use it (that's why the error)?
Thanks, any help would be appreciated!