i2cdevlib icon indicating copy to clipboard operation
i2cdevlib copied to clipboard

sample rate problem

Open yang614 opened this issue 10 years ago • 0 comments

Hi,all I am a newbie with this sensor and the library,I read the datasheet & RM for a long time,have a question: Sample Rate = Gyroscope Output Rate / (1 + SMPLRT_DIV),SMPLRT_DIV could reach to 255,so the minimum Sample Rate could be 3.9Hz . MPU6050_9Axis_MotionApps41.h line 305 0x02, 0x16, 0x02, 0x00, 0x09
// D_0_22 inv_set_fifo_rate // This very last 0x01 WAS a 0x09, which drops the FIFO rate down to 20 Hz. 0x07 is 25 Hz, // 0x01 is 100Hz. Going faster than 100Hz (0x00=200Hz) tends to result in very noisy data. // DMP output frequency is calculated easily using this equation: (200Hz / (1 + value) // It is important to make sure the host processor can keep up with reading and processing // the FIFO output at the desired rate. Handling FIFO overflow cleanly is also a good idea.

Why still need this line to reduce the fifo rate? I dont get it. SMPLRT_DIV has already done to reduce the rate for us, what is the point to reduce it again by line 305 if one step could reach the purpose?

Thanks

yang614 avatar Jul 07 '16 09:07 yang614