Temperature + humidity SHT31 with TinkerPie
A lab-grade climate sensor.
| Type | Smart sensors (I2C) |
|---|---|
| Connect to | SENSOR port · 0x44 |
| Gives | °C and % RH |
| Simulator | Yes: a control appears under the simulated board |
How it works
The SHT31 is a high-accuracy temperature and humidity sensor used in weather stations and labs. It measures both inside one chip and sends the results over I2C (address 0x44).
How to wire it
Plug into any SENSOR 1-4 port (SDA, SCL, 3.3 V, GND). Each type has a fixed I2C address, so different types can share the bus.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.shtTemperature()
sensors.shtHumidity()
// Arduino C++
sensors::shtTemperature()
sensors::shtHumidity() Good to know
- Typical accuracy about ±0.3 °C and ±2 % RH.
- Has a built-in heater to dry off condensation.
- Keep it out of direct sun and away from warm electronics.
Similar modules
- Light meter BH1750
- Temperature + humidity AHT20
- Motion sensor MPU6050
- Colour sensor TCS34725
- IR thermometer MLX90614
- Real-time clock DS3231
- 4-channel ADC ADS1115
- Current + voltage sensor INA219
More projects to try
Questions
Can I try the Temperature + humidity SHT31 without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Which climate sensor should a class start with?
Start with the DHT11 for simple projects. Move to the AHT20 or SHT31 when you need accurate numbers, for example in a greenhouse or a weather log.