Check the motion sensors in your phone or tablet: a bubble level built on the accelerometer, a guided axis check, a compass sweep, and a drift measurement taken while the device lies still. Everything runs in the browser.
Waiting for the first reading
Pick the device up and move it. Nothing is claimed about a sensor until it has actually reported something: a browser exposes the same events on a desktop with no accelerometer anywhere in it, and fills them with nulls.
No accelerometer reading yet
A bubble level needs gravity, and gravity arrives with the accelerometer. Move the device, or check that motion access is allowed above.
Open this page on the device you want to test. A desktop computer has none of these sensors, and no browser will invent them.
A phone's motion sensing is three separate parts pretending to be one: a chip that feels which way is down, a chip that feels turning, and a chip that feels the earth's magnetic field. Each fails on its own, in its own way, and each is checked separately above.
The accelerometer measures force, which at rest is gravity — that is how a phone knows which way up it is, and on its own it is enough for screen rotation and a step counter. The gyroscope measures turning, and it is what carries a camera through a fast pan or a headset through a head movement, because it responds in milliseconds where gravity takes a moment to settle. The magnetometer measures the earth's field and gives the other two a north to hang on. Cheaper phones ship an accelerometer alone; when a game says your device is unsupported, the gyroscope is usually what it is missing.
Every accelerometer has an offset — a small constant it adds to whatever it measures — and the phone subtracts a factory value for it. Drop the phone, or have the screen replaced, and the sensor's frame shifts relative to the housing it was calibrated against, so the correction no longer matches. The result is a level that reads a degree or two off on a surface that is perfectly flat, and no single reading can reveal it. Turning the device end for end is what separates the two, and it is what the check above does.
A gyroscope at rest reports a small non-zero rotation, and everything built on it has to keep subtracting that number. While the number is stable, subtracting works and nobody notices. When it grows — with age, with temperature, after a knock — the correction lags behind it, and you get a camera that creeps in a game, a compass that turns while the phone sits still, and a headset whose world slowly rotates. Twenty seconds of doing nothing is enough to measure it.
A magnetometer measures a field of about half a gauss, and almost anything nearby is stronger: a case with a magnetic clasp, a car dashboard mount, a speaker, a laptop lid, steel in a floor. Most of what looks like a broken compass is interference, and the figure-of-eight gesture map apps ask for is the phone rebuilding its correction from a fresh set of directions. A compass that sticks — a heading that jumps rather than sweeping — is the shape of the real fault, which is why the test above is a full turn rather than a single reading.
The sensors sit on the mainboard, and the frames they are calibrated against belong to the housing. A screen replacement, a battery swap, or a case that has been sprung open and closed can move both. A level that suddenly reads off, a compass that needs recalibrating constantly, and a gyroscope that drifts where it did not before are all worth checking together on a device that has just been opened.
Motion readings can be used to work out what somebody is typing, and to identify a device by the exact imperfections of its sensors, so WebKit stopped handing them out for free: on iPhone and iPad a page has to ask, from a real tap, over https. Chrome on Android does not ask, which is why this page shows a button on one and not on the other. Either way the readings stay in the page — nothing here is sent anywhere.