Sample IMU code