Sensor / 06

Plumb bob.

Hold the long edge of your phone flat against the wall, post, or door frame. The status turns green when you're within ±0.5° of vertical. Remove case bumps for best results.

Notes

Source: DeviceOrientationEvent gamma (roll). When the phone stands vertically, perfect plumb is gamma = ±90°; we report deviation from that. iOS requires permission first.

Enable motion sensors

iOS requires permission. Android starts automatically.

Deviation from vertical
—
waiting
Tolerance bands
green · plumb±0.5°
yellow · close±2°
red · off>2°
Frequently asked

How does a phone plumb bob work?

A real plumb bob is a weight on a string — gravity pulls the string vertical. Your phone does the same calculation digitally: the accelerometer measures the gravity vector, and the OS reports how far the device's long axis deviates from vertical. We display that deviation in degrees and turn the status indicator green when you're within ±0.5°.

How do I hold the phone?

Press the long edge of the phone flat against the wall, post, or door frame you're checking. Make sure the case isn't holding the phone away at one end (camera bumps can cause this — flip the phone or remove the case). The screen faces you; the back faces the wall. Wait a second for the reading to settle.

How accurate is it vs a real plumb bob?

A weighted plumb bob is theoretically perfect — gravity doesn't lie. In practice, draughts move it and the string has to hang free, so ±0.1° is typical. A phone plumb gives ±0.3-0.5° from a still position, limited by sensor noise and the flatness of your case. For hanging pictures, building shelving, or framing a non-critical wall, the phone is fine. For tile, brickwork, or anything where eyeball accuracy matters, use a real level or laser plumb.

What does the green/red status mean?

Green = within ±0.5° of vertical, plumb. Yellow = ±0.5° to ±2°, slightly off but probably fine for most carpentry. Red = beyond ±2°, visibly tilted, fix it. Thresholds are absolute degrees from true vertical; the sign tells you which way it leans (positive = top tips away from you, negative = top tips toward you).

How is this different from spirit level?

Spirit level is for horizontal surfaces — tables, floors, shelves. Plumb is for vertical surfaces — walls, posts, door frames. The underlying sensor data is the same, but we report the deviation from a different reference axis. Use /sensor/level for floors and /sensor/plumb for walls. The protractor at /sensor/protractor can measure arbitrary angles.

Why is the reading drifting slowly?

The OS uses sensor fusion that blends accelerometer (long-term truth, slow) with gyroscope (short-term smooth, drifty). When you first place the phone, the gyro path dominates and may drift a few degrees over 20-30 seconds before settling. If you see drift, lift the phone, hold it level for a second, then re-apply to the wall — that re-syncs the fusion to gravity.