Expo

Documentation

Sensors

expo-sensors provides various APIs for accessing device sensors to measure motion, orientation, pressure, magnetic fields, and step count.

Platform Compatibility

Android DeviceAndroid EmulatoriOS DeviceiOS SimulatorWeb

expo install expo-sensors

To use this in a bare React Native app, follow the installation instructions.

import * as Sensors from 'expo-sensors';
// OR
import {
  Accelerometer,
  Barometer,
  Gyroscope,
  Magnetometer,
  MagnetometerUncalibrated,
  Pedometer,
} from 'expo-sensors';
For more information, please see the documentation for the sensor you are interested in: