TINKER PiEDESIGN IN INDIA

Temperature + humidity AHT20 with TinkerPie

Small, fast and accurate. Also fits AHT10 and AHT21.

TypeSmart sensors (I2C)
Connect toSENSOR port · 0x38
Gives°C and % RH
SimulatorYes: a control appears under the simulated board

How it works

The AHT20 has a tiny chip that measures temperature and the amount of water vapour in the air (relative humidity). It does the maths itself and sends finished readings over I2C (address 0x38).

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.ahtTemperature()
sensors.ahtHumidity()

// Arduino C++
sensors::ahtTemperature()
sensors::ahtHumidity()

Good to know

Projects with the Temperature + humidity AHT20

Room climate on an LCDAn AHT20 sensor and a 16 × 2 LCD. The matrix smiles when the room is comfortable.Sensor projects

Similar modules

Questions

Can I try the Temperature + humidity AHT20 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.

Is the AHT20 better than the DHT11?

Yes: it is more accurate, faster and uses I2C, so it does not need special timing. The DHT11 is cheaper and fine for first projects.