Discussion:
[Shimmer-users] Getting the Accelerometer data
David Costa
2015-03-14 19:56:53 UTC
Permalink
Hi all,
I have been working with the EMG sensor so far with no problems.
However I am now trying to get the data from the accelerometer and I'm not
getting it to work.

When I Initialize the sensor I add this line to enable the accelerometer:

shimmerDevice.writeEnabledSensors(Shimmer.SENSOR_ACCEL);

and later I added this lines of cod which are similar to the EMG

Collection<FormatCluster> formatClustersX =
obj.mPropertyCluster.get("Accelerometer X");
if (formatClustersX != null) {
Log.d("sensor","data: "+formatClustersX.toString());
calibratedData = ((FormatCluster)
ObjectCluster.returnFormatCluster(formatClustersX, "CAL"));
if(calibratedData != null)
accelX = calibratedData.mData;
}

the collection is empty therefore I believe the problem is on the get
function could someone help me?

thanks,
--
David Costa,
About me <http://stbtuga.wix.com/davcosta>
Loading...