The DHT11 is an affordable and popular sensor used to measure temperature and humidity in various electronic projects.

The DHT11 is a digital sensor that communicates with the microcontroller via a single data wire (in “one-wire” mode).

It can measure temperatures ranging from 0 to 50°C with an accuracy of ±2°C and humidity levels between 20% and 80% with an accuracy of ±5% RH (relative humidity).

The sensor sends these values as digital data, making integration with platforms like the Raspberry Pi Pico easier.

Here are the different pins of the DHT11 sensor:

  • Signal: Sends the data to the Raspberry Pi Pico

  • Vcc: The power supply (5V)

  • GND: Ground

To compile programs that make the temperature sensor work, you will need the DHT11 library.

It comes in a .zip file, so to install it, you need to go to Sketch, then Include Library, and select Add .ZIP Library. You can find more explanations in our course on libraries.

Here is the program to make the DHT11 sensor work: