 
 // an MPU9250 object with its I2C address
 // of 0x68 (ADDR to GRND) and on Teensy 3.5 bus 0
-MPU9250 IMU(0x68, 0, I2C_PINS_18_19, I2C_PULLUP_EXT);
+static MPU9250 IMU(0x68, 0, I2C_PINS_18_19, I2C_PULLUP_EXT);
 
-float q[4] = {1.0f, 0.0f, 0.0f, 0.0f};
-float d[10];
+static float q[4] = {1.0f, 0.0f, 0.0f, 0.0f};
+static volatile float d[10];
+static volatile int count = 0;
 
 static int imuInterval = IMU_INTERVAL;
 

    eepromRW(EEPROM_IMU_INTERVAL, IMU_INTERVAL, imuInterval, action, time);
}

void imuLoop(unsigned long time, int mode)
{
    static unsigned long next;

    // is it this time to read IMU
    if (next < time)
    {
        // set up next ping time
        next = time + imuInterval;

        // get the accel (m/s/s), gyro (rad/s), and magnetometer (uT), and temperature (C) data
        IMU.getMotion10Unbiased(d);

        // Sensors x (y)-axis of the accelerometer/gyro is aligned with the y (x)-axis of the magnetometer;
        // the magnetometer z-axis (+ down) is misaligned with z-axis (+ up) of accelerometer and gyro!

    };

    IMU.setBias(b);

    status = IMU.setFilter(DLPF_BANDWIDTH_184HZ, 9);
    if (status < 0) 
    {
        setupFail("IMU INT unsuccessful");
    }
    pinMode(IMU_INT_PIN, INPUT);
    attachInterrupt(IMU_INT_PIN, getIMU, RISING);    
}

void imuEeprom(int action, const unsigned long time)
