Update imu.cpp

Set up basic logic for sensor loop.