hts221
Description
The hts221 object reads ambient temperature and relative humidity
using the STMicroelectronics® I2C-based HTS221 sensor interfaced with the Raspberry Pi® hardware. This object represents a connection from MATLAB® to the HTS221 sensor connected on the Raspberry Pi hardware board I2C pins I2C1_SDA (GPIO 2) and I2C1_SCL (GPIO 3). Before you use
the hts221 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 raspi.
Creation
Description
creates a HTS221 sensor object with default property values. The object represents a
connection to the sensor on the Raspberry Pi hardware sensor = hts221(mypi)mypi.
creates a HTS221 sensor object with properties using one or more
sensor = hts221(mypi,Name,Value)Name,Value arguments.
Input Arguments
Name-Value Arguments
Object Functions
readTemperature | Read one sample of temperature from sensor |
readHumidity | Read one relative humidity data sample from HTS221 sensor |
Examples
Extended Capabilities
Version History
Introduced in R2021a
See Also
readTemperature | readHumidity | raspi | scanI2CBus | showPins | Raspberry Pi Resource
Monitor App
