R
R
Roman Volkov2015-04-03 21:18:24
Android
Roman Volkov, 2015-04-03 21:18:24

Tracking the movement of the phone in space? Is the accelerometer responsible for this?

I think everyone knows the Magic 8 ball. So, I started to study cordova and write such an application so that after shaking the phone, an inscription appears on the ball, but I can’t figure out how to track that the phone was shaken along any of the axes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2015-04-03
@white_wolf_17

Position axes+Accelerometer+Hall sensor
The design of the accelerometer is such that it responds only to the component of acceleration that coincides with the direction of movement of the weight, the so-called sensitivity axis of the device. The simplest accelerometers have one such axis, but there are options with two or three sensitivity axes.

D
Dmitry Arushanov, 2015-12-15
@daruwanov

Also a couple of months ago, I dabbled in this, and also using MagicBall as an example - at first, I wrote an application that, when you click on the button, shook and animated the ball, and gave out the answer. Then screwed the accelerometer. There is no example code anymore. But if you search, you can find ready-made solutions. Getting into the code is not difficult. What would then adjust the sensitivity of shaking the phone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question