How to make sure the sensor is actually working?
Hi,
One general question first, will the sensors automatically stop sampling or don't execute the data routes after disconnect?
My use case is that after I set up any motion interrupt to trigger axis sampling for few seconds and then log the raw data points onto the board, I disconnect the sensor and reconnect every few minute to download data (if there are some). I applied this configuration to 4 sensors. The problem I am facing is that while some sensors are working properly as I expected, occasionally some sensors won't pick up any activity even if I shake them hard.
The configuration snippet is as below:
accel_module.configureAxisSampling()
.setOutputDataRate(Bmi160Accelerometer.OutputDataRate.ODR_1_5625_HZ)
.enableUndersampling((byte) 4)
.commit();
accel_module.routeData().fromAxes().log(SENSOR_DATA_LOG).commit().onComplete(accelHandler);
timerModule.scheduleTask(new com.mbientlab.metawear.module.Timer.Task() {
@Override
public void commands() {
accel_module.disableAxisSampling();
}
}, 3000, true).onComplete(new AsyncOperation.CompletionHandler<com.mbientlab.metawear.module.Timer.Controller>() {
@Override
public void success(final com.mbientlab.metawear.module.Timer.Controller result) {
accel_module.routeData().fromMotion().monitor(new DataSignal.ActivityHandler() {
@Override
public void onSignalActive(Map<String, DataProcessor> map, DataSignal.DataToken dataToken) {
result.start();
accel_module.enableAxisSampling();
}
}).commit().onComplete(new AsyncOperation.CompletionHandler<RouteManager>() {
@Override
public void success(RouteManager result) {
accel_module.configureAnyMotionDetection().setThreshold(0.032f).commit();
accel_module.enableMotionDetection(Bmi160Accelerometer.MotionType.ANY_MOTION);
accel_module.startLowPower();
}
});
}
});
Is there any method to make sure the any motion detection as well as data route is working properly?
This discussion has been closed.
Comments