It is basically axiomatic that can't achieve "without losses".
The best you can do is reduce them.
Have a CPU local to the MPU9250 that reads the data.
Read it repeatedly to ensure you got the right values.
(Drat. I forgot to do this! Time to consider more updates.)
Use a communication link between the local CPU and the controlling PI that uses at ...
why not use RS485 or RS422 as transfer layer. it will be more reliable, I think wireless can not ensure the stability, if your application has request on that, it's not a good idea. what you need is design a adaptor transfer message from i2c to uart or vice versa.
Does the following turn on and off your relay accordingly?
import RPi.GPIO as GPIO
RELAIS_1_GPIO = 18
That LDAC signal is truly nasty.
I have read the datasheet and your messages a few times and I can't quite focus on a specific issue so I figure out you're just brainstorming. I will start from what I know from direct experience.
How should I write this communication to be as orderly as possible - should I write special C routines within my Python ...
Setting a GPIO pin has a latching behavior. That is when you set it, it stays that same value until you tell it otherwise. So in your if statement, just add an else clause to reset it low if the value read is <=600:
if touch > 600:
print("moisture: " + str(touch))
OBSERVATION: I do not see a line of code / instruction to pull the GPIO back to low. If the observation is correct and this instruction is executed:
How would the line GPIO return to a low state?
Under what condition do you expect the GPIO to return to the low state?
What happens if the instructions is changed to:
A few thoughts:
Using dedicated I2C pins for your bit-banged I2C should be fine as long as you don't use smbus at the same time.
Improving GPIO timing in userspace can be done by increasing process priority (see man nice). Re-writing your bit-banging routines in C will help on average, but the worst case will be just as bad as with Python. The only way to ...