-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Many thanks for adding the DMP support for this library.
I followed the recent example Example5_DMP_Quat9_Orientation and was successful getting the quaternion values from the sensor as the example shows. However, I would also want to get multiple data values at the same time, including quaternions and raw accel,gyro,mag data.
To test it out, I added the following lines in the setup;
success &= (myICM.enableDMPSensor(INV_ICM20948_SENSOR_ACCELEROMETER) == ICM_20948_Stat_Ok);
success &= (myICM.setDMPODRrate(DMP_ODR_Reg_Accel, 200) == ICM_20948_Stat_Ok);
and in the loop
else if ((data.header & DMP_header_bitmap_Accel) > 0)
{
float acc_x = ((float)data.Raw_Accel.Data.X);
float acc_y = ((float)data.Raw_Accel.Data.Y);
float acc_z = ((float)data.Raw_Accel.Data.Z);
char sensor_string_buff[128];
sprintf(sensor_string_buff, "{\"accel_x\":%f, \"accel_y\":%f, \"accel_z\":%f}", acc_x,acc_y,acc_z);
Serial.println(sensor_string_buff);
}
However, I am not getting any data (both quaternion and accel values), and it seems like the fifo is empty.
When reading the data if ((myICM.status == ICM_20948_Stat_Ok) || (myICM.status == ICM_20948_Stat_FIFOMoreDataAvail))
is always false.
Appreciate any help to fix this.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working