+21622886281
DHT11 ESP32 SSD1306 display

Measure the temperature with ESP32 and DHT11 sensor

Purpose of this tutorial:

In this tutorial we will see how to read the temperature measured by the DTH11 sensor and display it on an SSD1306 display.

Necessary components

  • ESP32
  • DTH11 sensor
  • SSD1306 display
  • Connecting wires

Mounting

To perform the assembly

For DTH11 sensor, we connect:

  • the DATA pin to pin D23 of the ESP32 board

  • the VCC pin to the 3.3V pin of the ESP32 board

  • the GND pin to the GND pin of the ESP32 board

For SSD1306 display, we connect:

  • the SDA pin to the D21 pin of the ESP32 board

  • the SCL pin to pin D22 of the ESP32 board

  • the VCC pin to the 3.3V pin of the ESP32 board

  • the GND pin to the GND pin of the ESP32 board

Micropython program

Here is the program which reads the temperature measured by the DTH11 sensor and displays it on SSD1306 display.

 

Note: you must import the following libraries: ssd1306




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top