SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Movement & IMU category should be posted in this forum.
#201882
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.