Tuesday, 11 October 2011

First Apps - Accelerometer

Once happy with the compass, I started on the accelerometer app. The idea is to display the data received from the accelerometers textually and graphically.


I tried this using both the SensorManager.getOrientation() and the Sensor.TYPE_ACCELEROMETER methods. I found the latter worked better, as the former jumped from 180 to 0 degrees, which would cause problems later on. The code for this app is available here.

No comments:

Post a Comment