adapted and tested IMU code for arduino due