GeeCON Prague 2014*
The moose likes Java Micro Edition and the fly likes How to control the sample rate of an acceleration sensor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "How to control the sample rate of an acceleration sensor?" Watch "How to control the sample rate of an acceleration sensor?" New topic
Author

How to control the sample rate of an acceleration sensor?

Zoltan Ackermann
Greenhorn

Joined: Jan 26, 2010
Posts: 1
I'm trying to use the acceleration sensor of a Samsung i8910 from a Java MIDP application. I have implemented the DataListener interface found the Sensor, registered the listener and the application is receiving acceleration data.
The application receives a set of double values (X, Y, Z) once in a second, which is too rare for me. I would like to increase the sample rate somehow. It seems to me the buffer size has no (or no significant) effect on the call frequency. Additionally the received data does not reflect the latest acceleration values. If I turn the phone it takes approximately 10 seconds to get the correct values. It behaves like a rather slow built in filter. Although it might exist, I could not find a SampleRateControl either, which would make it possible to change the sampling frequency.
On the other hand I can check the acceleration sensor of the phone in test mode *#0*#, where I can see that its rather fast and responsive.

I would appreciate any idea for getting current acceleration data more frequently. I do not know if this is a phone specific or a general issue.
Thanks in advance for your support.
 
GeeCON Prague 2014
 
subject: How to control the sample rate of an acceleration sensor?