Fast reading from Adafruit_LSM9DS0 via I2C

I want to analyze vibration using accelerometer data from an Adafruit_LSM9DS0 linked to an Arduino Mega 2560 via I2C. As a first step I need fast sample readings from the sensor. The problem is that I cannot get past approximately 950 readings/second.

Here is the the relevant portion of my code:

Adafruit_LSM9DS0 lsm = Adafruit_LSM9DS0(1000);
void setupSensor() {
void setup() {//...
void loop() {  
  byte pack[8] = {0xAA, (byte) millis()}; //magic byte + truncated timestamp
  lsm.readBuffer(XMTYPE, 0x80 | Adafruit_LSM9DS0::LSM9DS0_REGISTER_OUT_X_L_A, 6, pack+2);
  Serial.write(pack, 8); //x, y and z coordinates are extracted on the other end

The manual (, page 31 says that I2C is supported up to 400kHz. What is the maximum rate I could realistically expect on the other end of the serial line?

I also observed that there are longer-shorter time sequences during which the accelerometer’s output is unchanged. The manual says that the register FIFO_SRC_REG (0x2F) should be queried regarding the FIFO’s state. In my case

uint8_t fifo_stat = lsm.read8(XMTYPE, FIFO_SRC_REG);

continuously returns 0x40 – which basically means empty queue. How should interpret this?

You might want to change up and have the LSMDS module send the uConstroller an interrupt signifying its got data do a read. You might want to change over to using the SPI buss.

And, just courious, when do you run setupSensor()?