Discussion:
[Shimmer-users] Shimmer android sampling rate
Roosmalen, W. van
2013-05-14 19:45:31 UTC
Permalink
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;
Edoardo Bonizzoni
2013-05-14 20:33:02 UTC
Permalink
Hi Roosmalen,
If you are using Boilerplate firmware you can't set different sampling
rate in one Shimmer. You should use the higher frequence you need in
your system. This is because is simpler manage just one sampling rate
firmware side.

You can write your own firmware, based on boilerplate, with different
sampling rate. :)

Best,
Edoardo
Post by Roosmalen, W. van
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?
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;
_______________________________________________
Shimmer-users mailing list
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
Loading...