Roosmalen, W. van
2013-05-14 19:45:31 UTC
I'm trying to use 1 Shimmer sensor in Android for both the Acceleration and ECG data.
But I want a sampling rate of 100 for the ECG and 10 for the acceleration.
How can i specify that?
This is what I have now:
case SensorTypes.SENSOR_ACCEL|SensorTypes.SENSOR_ECG: sensorDevice.writeEnabledSensors(SensorTypes.SENSOR_ACCEL|SensorTypes.SENSOR_ECG);
sensorDevice.writeSamplingRate(10);
dataUri = AccelContentProvider.CONTENT_URI;
intentData = new Intent(Constants.INTENT_ACTION_PROVIDE_SENSOR_DATA_START);
intentData.addCategory(Constants.INTENT_CATEGORY_SENSOR_DATA_SUBSCRIBER);
intentData.putExtra("uri", "AccelContentProvider.CONTENT_URI");
intentData.putExtra("datatype", SensorTypes.SENSOR_ACCEL);
intentData.putExtra("uri", "EcgContentProvider.CONTENT_URI");
intentData.putExtra("datatype", SensorTypes.SENSOR_ECG);
sendBroadcast(intentData);
break;
But I want a sampling rate of 100 for the ECG and 10 for the acceleration.
How can i specify that?
This is what I have now:
case SensorTypes.SENSOR_ACCEL|SensorTypes.SENSOR_ECG: sensorDevice.writeEnabledSensors(SensorTypes.SENSOR_ACCEL|SensorTypes.SENSOR_ECG);
sensorDevice.writeSamplingRate(10);
dataUri = AccelContentProvider.CONTENT_URI;
intentData = new Intent(Constants.INTENT_ACTION_PROVIDE_SENSOR_DATA_START);
intentData.addCategory(Constants.INTENT_CATEGORY_SENSOR_DATA_SUBSCRIBER);
intentData.putExtra("uri", "AccelContentProvider.CONTENT_URI");
intentData.putExtra("datatype", SensorTypes.SENSOR_ACCEL);
intentData.putExtra("uri", "EcgContentProvider.CONTENT_URI");
intentData.putExtra("datatype", SensorTypes.SENSOR_ECG);
sendBroadcast(intentData);
break;