joh Posted December 31, 2015 Report Share Posted December 31, 2015 Hello, iam using the mpu6050 and want to run the fifo buffer, but i get always the same values, though I activated all Sensor Data. What I did (pseudocode): MPU6050_reset(); //Trigger a full device reset delay(50) //wait 50msec MPU6050_setSleepEnabled(FALSE); //Set sleep mode status MPU6050_setDLPF_CFG(1); //Set DLPF to 184/188 Hz MPU6050_setSMPLRT_DIV(1) //Set SMPLRT_DIV to 1 for 500Hz MPU6050_setFullScaleGyroRange(MPU6050_GYRO_FS_250); //Set GYRO Range to 250 MPU6050_setFullScaleAccelRange(MPU6050_ACCEL_FS_2); //Set ACC Range to 2g MPU6050_setFIFO_OFLOW_EN(TRUE); //Set FIFO Buffer Overflow interrupt enabled status MPU6050_setFIFO_EN_XG_YG_ZG_ACCEL(TRUE) //Set FIFO enabled for all Sensor Data MPU6050_setFIFO_start(TRUE) //Start FIFO delay(160) //wait for 960Byte MPU6050_setFIFO_stop(TRUE) //Stop FIFO check if (mpu6050_Fifo_Overflow) MPU6050_reset_FIFO(); //Check for FIFO Overflow else MPU_6050_getFIFOCount(fifo_count); //Read FIFOCOUNT Data fifo_count /= 12; MPU6050_read_FIFO_R_W(BUFFER); //Read FIFO_R_W Data (uint8t Buffer [fifo_count]) .......... Mistake ? (fifo_count appear correct = 80) Problem: All Values in the Buffer are the same. Did I a Mistake or now someone this Problem. Quote Link to comment Share on other sites More sharing options...
joh Posted January 4, 2016 Author Report Share Posted January 4, 2016 i had to read out, the fifo while the Fifo is ON :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.