how to use PAccelerometer