Cảm biến

Kiểm tra chuyển động và la bàn

Đọc dữ liệu gia tốc kế, con quay hồi chuyển và la bàn nếu có, với mức bong bóng và hiển thị hướng trực tiếp.

Sự riêng tư: Các mẫu cảm biến được xử lý cục bộ. Không có dữ liệu chuyển động hoặc định hướng nào được tải lên hoặc lưu trữ.
Nhãn giao diện và tên công cụ được dịch. Hướng dẫn chi tiết và câu hỏi thường gặp trên trang này hiện được viết bằng tiếng Anh.

Giao diện thử nghiệm

Trình duyệt của bạn có thể yêu cầu quyền sau khi bạn nhấn Bắt đầu.
Trên một số thiết bị, quyền truy cập chuyển động và định hướng phải được cấp bằng cách nhấn nút.
Nhấn Bắt đầu để bắt đầu.
Alpha / tiêu đề—
bản thử nghiệm / Nghiêng trước/sau—
Gamma / Nghiêng bên này sang bên kia—
La bàn—
Tăng tốc X—
tăng tốc Y—
Tăng tốc Z—
Mẫu0
Giá trị cảm biến phụ thuộc vào hiệu chuẩn phần cứng, hỗ trợ trình duyệt và mô hình định hướng thiết bị. Việc đọc bị thiếu thường có nghĩa là trình duyệt không hiển thị cảm biến đó.

Cách sử dụng công cụ này

  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.

Quảng cáo

Giải thích kỹ thuật

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.

Khắc phục sự cố

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.

Câu hỏi thường gặp

Quảng cáo