lps22hb
Description
The lps22hb
object reads ambient temperature and absolute
pressure using the STMicroelectronics® I2C-based LPS22HB sensor interfaced with the Raspberry Pi® hardware. This object represents a connection from MATLAB® to the LPS22HB sensor connected on the Raspberry Pi hardware board I2C pins I2C1_SDA (GPIO 2) and I2C1_SCL (GPIO 3). Before you use
the lps22hb
object, ensure that the I2C interface is enabled on your
Raspberry Pi kernel. You can then create a connection to the Raspberry Pi board using the raspi
object and set its properties. For more
information, see enableI2C
and raspi
.
Creation
Description
creates a LPS22HB sensor object with default property values. The object represents a
connection to the sensor on the Raspberry Pi hardware sensor
= lps22hb(mypi
)mypi
.
creates a LPS22HB sensor object that represents a connection to the sensor connected to
the I2C bus on the Raspberry Pi hardware sensor
= lps22hb(mypi
,Bus
, I2CAddress
)mypi
.
Input Arguments
Object Functions
readTemperature | Read one ambient temperature data sample from LPS22HB sensor |
readPressure | Read one absolute pressure data sample from LPS22HB sensor |
Examples
Extended Capabilities
Version History
Introduced in R2021a
See Also
readTemperature
| readPressure
| raspi
| scanI2CBus
| showPins
| enableI2C
| disableI2C
| Raspberry Pi Resource
Monitor App