SHT31 Digital Temperature and Humidity Sensor
Overview
A sensor that can measure temperature (℃) and relative humidity (%). Uses I2C interface.

Specifications
- Operating Voltage: 2.15~5.5V
- Operating Current: <1.5mA
- Humidity Detection Range: 0%RH~100%RH
- Humidity Accuracy: ±2%RH@0%RH~100%RH(at 25℃)
- Temperature Detection Range: -40℃~125℃
- Temperature Accuracy: ±0.2℃@0℃~90℃(Typical)
- Communication: I2C
Supported GPIO
- Raspberry Pi 0~4
- Raspberry Pi 5
- BeagleBone Black/Green
- Jetson Nano
- FT232H, FT2232H, FT4232H
- MCP2221
Commands
[READ_DATA]
Reads temperature and humidity.
Item | Type | Description |
---|---|---|
Temperature(℃) | READ | Measured temperature. |
Humidity(%) | READ | Measured humidity. |
[READ_STATUS]
Reads the sensor’s Status Register value.
Item | Type | Description |
---|---|---|
Status Register | READ | Value of the Status Register in the module. (Refer to datasheet section 4.11) |
[RESET]
Resets the sensor.
[HEATER]
Turns the heater on or off. The heater can be used to evaporate moisture condensed on the humidity sensor for accurate humidity measurement.
Item | Type | Description |
---|---|---|
Heater Enable | WRITE | If true, turns the heater on; if false, turns the heater off. |
[IS_HEATER_ENABLED]
Determines whether the heater is turned on.
Item | Type | Description |
---|---|---|
Heater Status | READ | Returns true if the heater is turned on, false otherwise. |
Example
Objective
Display measured temperature and humidity on dashboard gauge widgets.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
SHT31 | 1 |
* Other hardware can also be used. Refer to Supported GPIO.
Wiring
Connect each component to the corresponding connection as listed in each row below.
SHT31 | GPIO |
---|---|
VIN | 3.3V |
GND | GND |
SCL | 3 (I2C1 SCL) |
SDA | 2 (I2C1 SDA) |
ADR (AD) * | No connection |
* If not connected, I2C address is 0x44, if connected to 3.3V it is 0x45. (May vary depending on module manufacturer.)

Project Link