Setting up the DHT22 to the ESP32 with the Arduino IDE

Temperature | Humidity

⚗ Kevin Summersill 🔋
3 min readNov 13, 2020

In this article, we will connect the DHT22 to the ESP32 chip. This means we should be able to tell the humidity and temperature within the location you have your DHT22 chip connect. So let’s get started.

Photo by Inge Maria on Unsplash

What I will be utilizing in this article

I will be of course using an ESP32. The power is done via a USB cable from my pc to the board. I will also be utilizing a breadboard. https://amzn.to/3ppyVas

I will also be utilizing a DHT22 device which will be used to gather temperature and humidity data.

https://amzn.to/2GWb3K6

When you buy something using the retail links in the article, I may earn a small commission. (FTC Required Statement)

Install the DHT Libraries to Arduino IDE

In order to use the DHT22, we must install the libraries first.

  1. Go to Sketch > Manage Libraries > Library Manager
  2. Search for “DHT” and select the “DHT sensor library”. You can install it by click install at the bottom right. Make sure to “Install all” if asked. This will install the Adafruit Unified Sensor dependency for the DHT Sensor library. Close when done…

--

--

⚗ Kevin Summersill 🔋
⚗ Kevin Summersill 🔋

Written by ⚗ Kevin Summersill 🔋

Enterprise Solution Architect | Certified K8s Administrator/Developer ⚓ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer 🔥

No responses yet