How to enable tap detection Interrupts along with pedometer in MPU6050 using DMP

By arunjoec , 31 August 2017

Hi,
I have successfully implemented pedometer in my wearable device application and now I need to wakeup the device to
show time on tap or on a gesture, I tried this by enabling the tap detection feature along with pedometer,
but not interrupts are created on taps, Below given is my code.

       if(mpu_init(NULL))
while(){
if(!mpu_init(NULL))
CPUdelay();
break;
}
/* Wake up all sensors. */
mpu_set_sensors (INV_XYZ_GYRO | INV_XYZ_ACCEL);
mpu_set_sample_rate ();

if(dmp_load_motion_driver_firmware())
while(){
}

int dmp_features;
dmp_features = DMP_FEATURE_TAP|DMP_FEATURE_PEDOMETER;
dmp_enable_feature(dmp_features );
mpu_set_dmp_state ();
mpu_set_int_level();
dmp_set_interrupt_mode(DMP_INT_GESTURE);
dmp_set_tap_thresh(TAP_Z, );


What could be going wrong in these codes?

Regards,
JOE

phpbb Topic ID
36459