Lost i2c signal, Arduino stuck

ok, i've posted the whole code in my first post.

I'm using it on a off-road vehicle and the sensor has to be removed very often.
so i'm looking for a software solutions.