Main Content

Sensors

Read data from sensors

Connect to different sensors to read data.

Functions

expand all

mpu9250Connect to MPU-9250 sensor on Arduino hardware I2C bus (Since R2019a)
lsm9ds1Connect to LSM9DS1 sensor on Arduino hardware I2C bus (Since R2019a)
mpu6050Connect to MPU-6050 sensor on Arduino hardware I2C bus (Since R2019a)
lsm303cConnect to LSM303C sensor Arduino hardware I2C bus (Since R2021a)
lsm6ds3Connect to LSM6DS3 sensor on Arduino hardware I2C bus (Since R2021a)
lsm6ds3hConnect to LSM6DS3H sensor on Arduino hardware I2C bus (Since R2021a)
lsm6dslConnection to LSM6DSL sensor on Arduino hardware I2C bus (Since R2021a)
lsm6dsmConnect to LSM6DSM sensor on Arduino hardware I2C bus (Since R2021a)
lsm6dsoConnect to LSM6DSO sensor on Arduino hardware I2C bus (Since R2021a)
lsm6dsrConnect to LSM6DSR sensor on Arduino hardware I2C bus (Since R2021a)
hts221Connect to HTS221 sensor on Arduino hardware I2C bus (Since R2021a)
lps22hbConnect to LPS22HB sensor on Arduino hardware I2C bus (Since R2021a)
adxl345Connect to ADXL345, ADXL343, ADXL344, or ADXL346 sensor on Arduino hardware I2C bus (Since R2022a)
icm20948Connect to ICM-20948 sensor on Arduino hardware I2C bus (Since R2022a)
bmp280Connect to BMP280 sensor on Arduino hardware I2C bus (Since R2022b)
lis3dhConnect to LIS3DH sensor on Arduino hardware I2C bus (Since R2022b)
bmi160Connect to BMI160 sensor on Arduino hardware I2C bus (Since R2023a)
flushFlush the host buffer (Since R2019a)
infoRead information related to sensor (Since R2019a)
readRead real-time sensor data at a specified rate (Since R2019a)
readAccelerationRead one sample of acceleration from sensor (Since R2019a)
readAngularVelocityRead one sample of angular velocity from sensor (Since R2019a)
readMagneticFieldRead one sample of magnetic field from sensor (Since R2019a)
readTemperatureRead one sample of temperature from sensor (Since R2021a)
readHumidityRead one sample of relative humidity data from the sensor (Since R2021a)
readPressureRead one sample of barometric air pressure data from the sensor (Since R2021a)
readVoltageRead voltage from ADC pins on sensor (Since R2023a)
releaseRelease the sensor object (Since R2019a)
stopStop data collection from sensor object (Since R2020a)
bno055Connect to BNO055 sensor on Arduino hardware I2C bus (Since R2020a)
flushFlush the host buffer for BNO055 sensor (Since R2019a)
infoRead output data rate and bandwidth setting of BNO055 sensor (Since R2019a)
readRead acceleration, angular velocity, magnetic field, time, and overrun data from BNO055 sensor (Since R2019a)
readAccelerationRead one sample of acceleration from BNO055 sensor (Since R2019a)
readAngularVelocityRead one sample of angular velocity from BNO055 sensor (Since R2019a)
readCalibrationStatusRead calibration status of BNO055 sensor (Since R2019b)
readMagneticFieldRead one sample of magnetic field strength from BNO055 sensor (Since R2019a)
readOrientationRead orientation data from BNO055 sensor (Since R2019b)
releaseRelease the BNO055 object (Since R2019a)
gpsdevConnect to GPS receiver on Arduino hardware (Since R2020a)
flushFlush the host buffer (Since R2020a)
infoRead Update Rate, GPS Lock information and number of satellites in View for the GPS receiver (Since R2020a)
readRead data from GPS (Since R2020a)
releaseRelease the GPS object (Since R2020a)
stopStop data collection from GPS module (Since R2020a)
writeBytesWrite raw data to GPS module (Since R2020a)
apds9960Connect to APDS9960 sensor on Arduino hardware using I2C bus (Since R2021b)
readColorReads clear light and RGB components through APDS9960 sensor (Since R2021b)
readGestureRead gesture through APDS9960 sensor (Since R2021b)
readProximityRead the proximity from APDS9960 sensor (Since R2021b)
ultrasonicConnection to ultrasonic sensor on Arduino hardware (Since R2019a)
readDistanceDistance to object in front of ultrasonic sensor (Since R2019a)
readEchoTimeRead echo time of ultrasound waves (Since R2019a)

Topics

Troubleshooting

Troubleshooting Sensors

Troubleshoot sensors