Skip to content
Free IDE

← Components

DHT11

Digital temperature and humidity sensor, the simpler sibling of the DHT22: smaller range and whole numbers only. It connects the same way (one data wire) and uses the same dht module of MicroPython, with dht.DHT11.

Pinout

VCCDATANCGND
PinConnect toNote
VCC (1)3V3
DATA (2)GPIO (e.g. 4) with a pull-up resistormodules with a board already have the resistor
NC (3)leave unconnected
GND (4)GND
FastTeacherFor teachers

From the syllabus to a planned semester

  • Teaching plan and calendar built automatically
  • Class diary ready to paste into SIGA
  • Slides and exercise lists with answer keys
Meet FastTeacher

Free Community edition · Windows

MicroPython example

import dht
from machine import Pin
import time

sensor = dht.DHT11(Pin(4))

while True:
    sensor.measure()  # at most one reading per second
    print(sensor.temperature(), "°C", sensor.humidity(), "%")
    time.sleep(2)

Specifications

ItemValueSource
Power supply3.3–5.5 V (same as the DHT22)Typical datasheet values
Temperature0 to 50 °C, ± 2 °CTypical datasheet values
Humidity20–90 % RH, ± 5 %Typical datasheet values
Interval between readings≥ 1 sTypical datasheet values
Resolutionwhole numbersPyPlaca component catalog — Under review: newer DHT11 units send tenths of °C
Pin orderVCC, DATA, NC, GNDTypical datasheet values

Values marked "Under review" will still be checked against the parts in the lab.

FastMindLocal AI assistant

The AI that remembers your life and lives on your computer

  • Long-term memory with the source of every answer
  • Works offline: your data stays on your PC
  • Reads PDFs, slides, photos and meeting recordings
Download free for Windows

Essential plan free forever

FastTeacherFor teachers

From the syllabus to a planned semester

  • Teaching plan and calendar built automatically
  • Class diary ready to paste into SIGA
  • Slides and exercise lists with answer keys
Meet FastTeacher

Free Community edition · Windows

FastMindLocal AI assistant

The AI that remembers your life and lives on your computer

  • Long-term memory with the source of every answer
  • Works offline: your data stays on your PC
  • Reads PDFs, slides, photos and meeting recordings
Download free for Windows

Essential plan free forever