perry's code from summer for imu logging + cameras