What you can do with Device Sensor Test
- Read phone motion sensor values
- Check device orientation events
- Inspect accelerometer and rotation rate readings
What this hardware diagnostic tests
Read browser-reported device-motion and orientation event values, including acceleration with gravity, rotation rate, and three orientation angles.
Example input
window.addEventListener('devicemotion', ({ accelerationIncludingGravity, rotationRate }) => console.log(accelerationIncludingGravity, rotationRate));
window.addEventListener('deviceorientation', ({ alpha, beta, gamma }) => console.log({ alpha, beta, gamma }));Example output
Acceleration: X: 0.12 | Y: 9.81 | Z: 0.04 m/s²; Rotation Rate: α: 0.50 | β: -0.20 | γ: 0.10 °/s; Orientation: α: 184.20 | β: 12.50 | γ: -3.80°Practical workflow
- Open the tool in a secure browser on a phone or tablet and select Start Sensor Test.
- Grant motion or orientation access if the browser asks for permission.
- Tilt and turn the device, then read the acceleration, rotation-rate, and orientation values as browser events arrive.
- Select Stop Test to remove the event listeners and clear the displayed readings.
Common use cases
- Confirming that a supported mobile browser delivers motion or orientation events to a page.
- Observing how device tilt changes browser-reported orientation angles and rotation rates.
- Checking sensor permission behavior before integrating device-motion events into a web prototype.
Important notes and limitations
- DeviceMotionEvent and DeviceOrientationEvent require a secure context and are not exposed by every browser or device; some browsers require permission from a user gesture.
- The tool reads accelerationIncludingGravity, so the acceleration values include gravity rather than representing linear acceleration alone.
- Alpha, beta, and gamma describe device orientation; alpha is not guaranteed to be a calibrated compass heading relative to geographic north.
- Sensor values may be unavailable or null, and this readout does not calibrate sensors or diagnose hardware damage.
- Event values stay in page memory and are not sent to a server.
Generic Sensor API & DeviceOrientation Diagnostics
Inspect Linux motion sensors via iio-sensor-proxy
monitor-sensorStreams live accelerometer readings and device orientation changes from kernel IIO sensors.
Sensor permission & accelerometer calibration
DeviceOrientationEvent requires user permission on iOS Safari
Cause: Apple requires explicit permission request via 'DeviceOrientationEvent.requestPermission()' initiated by user click.
Solution: Trigger permission request on explicit button tap before binding window deviceorientation listeners.
Continue your workflow
- Touchscreen Test — test multi-touch digitizer responsiveness on mobile screens.
- Battery Status — inspect the battery level and charging state that the browser reports.
Frequently asked questions
Why is the sensor readout blank after I start the test?
The browser may not expose motion or orientation events for this device, may require a secure context or a permission gesture, or may be blocking access through browser settings or Permissions Policy. The tool shows values only after an event includes a reading.
Does the alpha angle always point to magnetic or geographic north?
No. Alpha is an orientation angle around the device coordinate system and is not guaranteed to be a calibrated compass heading. The browser may provide relative orientation rather than an absolute north reference.
Do the acceleration values remove the force of gravity?
No. This tool displays accelerationIncludingGravity, which includes gravity. The page does not display the separate linear acceleration value.