Temperature + humidity DHT11 with TinkerPie
The classic blue weather sensor. Read it at most once a second.
| Type | Timing sensors |
|---|---|
| Connect to | any accessory pin |
| Gives | °C and % RH |
| Simulator | Yes: a control appears under the simulated board |
How it works
Inside the DHT11 is a humidity-sensing layer and a small thermistor. A tiny chip measures them and sends the result over one data wire with a special timing code, which the TinkerPie firmware decodes.
How to wire it
One or two signal pins on S1-S4 or P10-P13. Studio reads them with precise timing in the board firmware.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.dhtTemperature(Pin.S1)
sensors.dhtHumidity(Pin.S1)
// Arduino C++
sensors::dhtTemperature(Pin::S1)
sensors::dhtHumidity(Pin::S1) Good to know
- Range about 0-50 °C (±2 °C) and 20-90 % humidity (±5 %).
- Read it at most once a second, or it returns old values.
- Cheap and good for weather stations and plant projects.
Projects with the Temperature + humidity DHT11
Similar modules
More projects to try
Questions
Can I try the Temperature + humidity DHT11 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.
Why does my DHT11 sometimes show the same value?
The DHT11 only updates about once a second. Read it in a loop with a pause of 1-2 seconds.