lsm6dsr
Add-On Required: This feature requires the MATLAB Support Package for Raspberry Pi Hardware add-on.
Description
The lsm6dsr
object reads ambient temperature, and linear
acceleration and angular velocity along the X, Y, and Z axes using the STMicroelectronics® I2C-based LSM6DSR inertial measurement unit (IMU) sensor interfaced with the
Raspberry Pi® hardware. Before you use the lsm6dsr
object, enable the I2C
interface using the Hardware Setup screen. You can then create a connection to the Raspberry Pi board using the raspi
object and set its properties. For more
information, see raspi
.
Creation
Description
creates a LSM6DSR sensor object with default property values. The object represents a
connection to the sensor on the Raspberry Pi hardware sensor
= lsm6dsr(mypi
)mypi
.
creates a LSM6DSR sensor object with properties using one or more
sensor
= lsm6dsr(mypi
,Name,Value
)Name,Value
arguments.
Input Arguments
Object Functions
readAcceleration | Read one sample of acceleration from sensor |
readAngularVelocity | Read one sample of angular velocity from sensor |
readTemperature | Read one sample of temperature from sensor |
Examples
Extended Capabilities
Version History
Introduced in R2023a
See Also
readAcceleration
| readAngularVelocity
| readTemperature
| lsm6dsm
| lsm6ds3h