Reference
Library
- DFRobot_SHT3x Library and Example Programs
- Installation guide: How to install Arduino libraries
Principle
The SHT31-F digital temperature and humidity sensor is built on Sensirion’s SHT31-F IC and CMOSens® technology, integrating capacitive humidity sensing and band-gap temperature sensing into a single, highly reliable module. It features fast response, low power consumption, and strong resistance to interference. The sensor communicates via I²C and is compatible with 3.3 V / 5 V controllers such as Arduino, micro:bit, and ESP32, making it easy to achieve accurate and stable environmental sensing in smart homes, intelligent buildings, industrial automation, and IoT applications.
As the standard model in the SHT3x series, the SHT31-F provides ±2% RH humidity accuracy and ±0.2°C temperature accuracy (typical) from 0°C to 90°C.
The device incorporates an IP67-rated PTFE protective membrane that shields the sensing opening from dust and water spray, enabling reliable operation in harsh environments. The membrane’s high vapor permeability ensures that the temperature and humidity response time remains comparable to an uncovered sensor. Note that while the membrane protects against water and dust ingress, it does not prevent contamination from volatile chemicals.

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();
Was this article helpful?
