Skip to content

NilsRousseau/ESP-32-DHT-22-temperature-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ESP-32-DHT-22-temperature-sensor

A simple implementation of a DHT-22 sensor with an ESP-32

What you'll need:

  • 1 ESP-32 dev module (at least 30 pins)
  • 1 DHT-22 sensor
  • 3 jumper cables
  • 1 breadboard

How to wire ?

  • To supply power to the DHT-22, you'll need to wire the ESP-32's 3v3 pin to the DHT-22's VCC pin.

  • To transfer data from the sensor to the microcontroller, you'll have to wire the DHT-22's DATA pin to the ESP-32's GPIO 4 pin.
    (You can use any GPIO pin, but you'll need to modify the source)

  • Wire sensor's GND pin to microcontroller's GND pin

ESP32 DHT22
3v3 VCC
GPIO 4 DATA
GND GND

Flashing:

  1. Download and install the arduino ide.
  2. Open the project.
  3. Connect your ESP-32 to your computer using a USB-C cable (can be a USB-B cable, depends on the model)
  4. Go to File > preferences and paste "https://dl.espressif.com/dl/package_esp32_index.json" into the "additionnal boards" text input.
  5. Next, you'll need to install DHT sensor library from Adafruit in the library manager (3rd icon on the left sidebar).
  6. Go to Tools > board > esp32 and select ESP32 Dev Module.
  7. Go to Tools > board > port and select the correct COM port.
  8. Falsh with the top left arrow button !
  9. Open the serial monitor, select 115200 baud, and wait for output.

About

A simple implementation of a DHT-22 sensor with an ESP-32

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages