Work with accelerometer