Closed i17brn closed 3 years ago
Really hard to say without seeing more code, understanding the microcontroller this is used on, or the wiring between the microcontroller and the sensor.
I would also recommend using the sample rate divider to set the desired output rate and then using the interrupt generated from the IMU to trigger your ISR. Then you're guaranteed to always have data ready at the desired rate.
Hi, I would like to fill a buffer data, I create a timer in order to sampling 200 sampler per second, I would like to get this data from the accelerometer, but always is the same data in the 200 samples. could you help me?
void IRAM_ATTR TimerHandler0(void) { //sampling function IMU.readSensor(); myBufferX[pos] = IMU.getAccelX_mss(); myBufferY[pos] = IMU.getAccelY_mss(); myBufferZ[pos] = IMU.getAccelZ_mss(); pos++;
}