Guide to gyro and accelerometer with Arduino including Kalman filtering

@Geoffroy
It seems weird that you can't access both sensors on the same bus, but yes your code looks good to me if you want to use it in bypass mode.

You should be able to simply connect both sensors to SCL and SDA at the same time. Maybe try adding a pullup resistor to 3.3V and see if that solves the problem.