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
lsm9ds1Connect to LSM9DS1 sensor on Arduino hardware I2C bus
mpu6050Connect to MPU-6050 sensor on Arduino hardware I2C bus
lsm303cConnect to LSM303C sensor Arduino hardware I2C bus
lsm6ds3Connect to LSM6DS3 sensor on Arduino hardware I2C bus
lsm6ds3hConnect to LSM6DS3H sensor on Arduino hardware I2C bus
lsm6dslConnection to LSM6DSL sensor on Arduino hardware I2C bus
lsm6dsmConnect to LSM6DSM sensor on Arduino hardware I2C bus
lsm6dsoConnect to LSM6DSO sensor on Arduino hardware I2C bus
lsm6dsrConnect to LSM6DSR sensor on Arduino hardware I2C bus
hts221Connect to HTS221 sensor on Arduino hardware I2C bus
lps22hbConnect to LPS22HB sensor on Arduino hardware I2C bus
flushFlush the host buffer
infoRead information related to sensor
readRead real-time sensor data at a specified rate using Sensor Fusion and Tracking Toolbox or Navigation Toolbox
readAccelerationRead one sample of acceleration from sensor
readAngularVelocityRead one sample of angular velocity from sensor
readMagneticFieldRead one sample of magnetic field from sensor
readTemperatureRead one sample of temperature from sensor
readHumidityRead one sample of relative humidity data from the sensor
readPressureRead one sample of barometric air pressure data from the sensor
releaseRelease the sensor object
stopStop data collection from sensor object
bno055Connect to BNO055 sensor on Arduino hardware I2C bus
flushFlush the host buffer
infoRead output data rate and bandwidth setting of sensor
readRead acceleration, angular velocity, magnetic field, time, and overrun data
readAccelerationRead one sample of acceleration from sensor
readAngularVelocityRead one sample of angular velocity from sensor
readCalibrationStatusRead calibration status of sensor
readMagneticFieldRead one sample of magnetic field strength from sensor
readOrientationRead orientation data from sensor
releaseRelease the BNO055 object
gpsdevConnect to GPS receiver on Arduino hardware
flushFlush the host buffer
infoRead Update Rate, GPS Lock information and number of satellites in View for the GPS receiver
readRead data from GPS
releaseRelease the GPS object
stopStop data collection from GPS module
writeBytesWrite raw data to GPS module
apds9960Connect to APDS9960 sensor on Arduino hardware using I2C bus
readColorReads clear light and RGB components through APDS9960 sensor
readGestureRead gesture through APDS9960 sensor
readProximityRead the proximity from APDS9960 sensor

Topics

Read and Plot Real-Time Data from BNO055 Sensor in NDOF Mode

This example shows you how to read and plot calibrated data from a a Bosch Sensortec BNO055 a 9-axis absolute orientation sensor in real time.

Calibrate BNO055 Sensors

Steps to calibrate the BNO055 sensors.

Limitations

Limitations when using sensors and GPS receiver.

Pitch and Roll Calculation on Arduino Using IMU Sensor (Simulink Support Package for Arduino Hardware)

This example shows how to read the acceleration and angular velocity data from IMU sensor mounted on Arduino® hardware and calculate the pitch and roll angles.

Measure LSM9DS1 Sensor Outputs Using Nano 33 BLE Sense

Read data from a LSM9DS1 sensor using Bluetooth®.

Troubleshooting

Troubleshooting Sensors

Troubleshoot sensors

Featured Examples