How to Test Phone Motion Sensors
Tap Start Sensor Scan, allow motion access if your browser asks, then slowly tilt the phone forward, backward, left, and right. The preview should move smoothly and the alpha, beta, gamma, and acceleration values should update as the device moves.
For a used phone check, rotate the device in all directions and watch for frozen values, sudden jumps, or sensors that never start. Some browsers block sensor access unless the page is opened through HTTPS and triggered by a user gesture.