9DOF_Razor_IMU - Changing accelerometer sampling rate

Have questions about a SparkFun product or board? This is the place to be.

Moderator: phalanx

Post Reply
Brusa1979
Posts: 1
Joined: Wed Jan 30, 2019 12:12 am

9DOF_Razor_IMU - Changing accelerometer sampling rate

Post by Brusa1979 » Wed Jan 30, 2019 12:22 am

Hi all, I am a new sensor user and am struggling to get my head around some of the code I'm encountering.

I'm working with a SparkFun 9DOF_Razor_IMU sensor and I was hoping to be able to set the accelerometer sampling rate at 1000Hz.

The config files states the following:

#define IMU_AG_SAMPLE_RATE 1000 // Accel/gyro sample rate Must be between 4Hz and 1kHz

However also included in the firmware is the following statement:

// Set gyro/accel sample rate: must be between 4-1000Hz
// (note: this value will be overridden by the DMP sample rate)

#define DMP_SAMPLE_RATE 100 // Logging/DMP sample rate(4-200 Hz)

I am confused why the seemingly possible 1kHz Accel sampling rate would be overwritten by the DMP sampling rate which is limited to 200Hz.

Is anyone able to assist me?

Regards, Kelly.

Post Reply