Gyroscope and accelerometer viewer
Press Start on a phone or tablet and tilt it. The page shows the values from the DeviceOrientation and DeviceMotion events. Most laptops and desktops have no such sensors, and the page tells you so.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Open the page on a phone or tablet, over https.
- Press Start and, on iPhone, allow motion access.
- Tilt, turn and shake the device and watch the numbers.
- Press Stop to remove the listeners.
What the values mean
- Orientation in degrees from the DeviceOrientation event.
- Acceleration in m/s² without gravity, and with gravity, from the DeviceMotion event.
- Rotation rate in degrees per second, which is the gyroscope reading.
Worked example
A phone lying flat and still reports gravity of about (0, 0, 9.8). The magnitude is the square root of 0² + 0² + 9.8² = 9.8 m/s². Tilted on its edge, the 9.8 moves to the x or y axis and the magnitude stays the same.
Tips
- A magnitude far from 9.8 at rest points to a sensor that needs calibration.
- Browsers may cap how often events arrive.
- Axis signs differ between platforms, so compare values only on the same device.
Frequently asked questions
Why does it say no sensor data on my computer?
Most desktops and many laptops have no gyroscope or accelerometer. Some browsers fire a single empty event on such devices, which the page ignores. Try a phone or tablet.
Why does my iPhone ask for permission?
iOS and iPadOS require an explicit permission before a page may read motion and orientation. The page asks when you press Start. If you refuse, you may need to allow it again in the browser settings.
What do alpha, beta and gamma mean?
They are the device's rotation angles in degrees. Beta is the front-to-back tilt, gamma the left-to-right tilt, and alpha the rotation around the vertical axis (compass-like).
Why does gravity show about 9.8 when the phone lies still?
The "with gravity" values include Earth's pull of about 9.81 m/s². At rest the magnitude should be close to that. The plain acceleration values leave gravity out when the device can separate it.
Is anything recorded?
No. The listeners start when you press Start and are removed when you press Stop or leave the page.