Reference
Last revision 2025/12/18
Library
- Download and install the SHT3x Library and Example Programs.
- How to install the library?
Working Principle
The Gravity: SHT31-F Digital Temperature and Humidity Sensor is based on the Sensirion SHT31-F sensor IC.
Using CMOSens® technology, the chip integrates a capacitive humidity sensing element and a band-gap temperature sensing element on a single die. This highly integrated design enables accurate, stable, and low-power measurement of ambient relative humidity and temperature.
The measured signals are internally processed and output via the I²C interface, allowing direct digital communication with 3.3 V / 5 V controllers.
To protect the sensing elements, the SHT31-F features a PTFE membrane that provides IP67-level protection against water spray and dust. The membrane has high water vapor permeability, ensuring that humidity and temperature response times remain comparable to those of an uncovered sensor. However, it does not prevent contamination from volatile chemical substances.

API Description
/**
* @brief Get the measured temperature (in degrees Celsius).
* @return Return the temperature data of float type.
*/
float getTemperatureC();
/**
* @brief Get the measured temperature (in degrees Fahrenheit).
* @return Return the temperature data of float type.
*/
float getTemperatureF();
/**
* @brief Get measured humidity(%RH).
* @return Return the humidity data of float type.
*/
float getHumidityRH();
Other Supplementary Information
Was this article helpful?
