Sensors

Motion and Compass Test

Read accelerometer, gyroscope, and compass data where available, with a bubble level and live orientation display.

Privacy: Sensor samples are processed locally. No motion or orientation data is uploaded or stored.

Test interface

Your browser may ask for permission after you press Start.
On some devices, motion and orientation access must be granted from a button press.
Press Start to begin.
Alpha / Heading—
Beta / Tilt front/back—
Gamma / Tilt side to side—
Compass—
Accel X—
Accel Y—
Accel Z—
Samples0
Sensor values depend on hardware calibration, browser support and the device orientation model. A missing reading usually means the browser does not expose that sensor.

How to use this tool

  1. Click Enable sensors and grant motion permission if your browser asks.
  2. Tilt the device and watch the bubble level and axis values.
  3. Rotate the device to check compass behaviour where supported.
  4. Stop the test to remove event listeners and end sensor access.

Advertisement

Technical explanation

The Generic Sensor API and DeviceOrientation/DeviceMotion events expose orientation and motion depending on platform. iOS requires an explicit permission request after a gesture; many desktops expose no motion sensors at all.

Compass readings can be affected by magnetic interference from cases, speakers, and metal surfaces. A browser cannot calibrate the sensor or prove that a reading is physically accurate.

Troubleshooting

Sensors are unsupported

Desktop browsers often have no motion sensors. Use a mobile device with the required hardware.

Permission request does not appear

On iOS, call the permission prompt from a direct user gesture and ensure the page is served over HTTPS.

Values drift

Magnetic interference and sensor fusion algorithms can cause drift. Move away from magnets and metal objects.

Compass points the wrong way

Compass accuracy varies by device and environment. Do not rely on it for navigation.

Frequently asked questions

Advertisement