solved error in IMU because I was calling it before the delay