Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Accelerometer sample in Blackberry

Hi,

I want to integrate Accelerometer in my application. I check the sample provided by blackberry for accelerometer when i check the x,y,z value return by Accelerometer is -34,213,927. How can i convert this value in m/s*s? I tried to find out from net but did not find any helpful result for this. I check out this app on blackberry Accelrometer Recorder where they print out value as i wanted in my applicatin so please help me?

 

Below is my code for Accelerometer.

Channel _accChannel = AccelerometerSensor.openRawDataChannel( Application.getCurrent());

 _accChannel.getLastAccelerationData( _xyz );

System.out.println("Value of X:........"+_xyz[0]  );
System.out.println("Value of Y:........"+_xyz[1] );
System.out.println("Value of Z:........"+_xyz[2] );