- Internet of Things Projects with ESP32
- Agus Kurniawan
- 136字
- 2021-06-24 16:02:54
Wiring
Let's begin by exploring the DHT22 sensor module. This module can sense temperature and humidity. In general, the DHT22 has four pins. You can see the sensor pinout in Figure 2-3:

Figure 2-3: A general pinout for a DHT22 sensor module
For our demo, we need to wire the hardware as follows:
- Connect DHT22 pin 1 to the ESP32 board 3.3V.
- Connect DHT22 pin 2 to the ESP32 board GPIO 26 (IO26). You can add a pull resistor 4K7 (optional).
- Connect DHT22 pin 4 to the ESP32 board GND. You can add a pull resistor 4K7 (optional).
You can see my hardware wiring with the ESP-WROVER-KIT board and DHT22 in Figure 2-4:

Figure 2-4: A wiring sample from my hardware
Now that we have covered hardware wiring, let's move on to writing the program.
推薦閱讀
- INSTANT Wijmo Widgets How-to
- Manage Partitions with GParted How-to
- Mastering Manga Studio 5
- 微服務分布式架構基礎與實戰:基于Spring Boot + Spring Cloud
- The Deep Learning with Keras Workshop
- Hands-On Artificial Intelligence for Banking
- Mastering Machine Learning on AWS
- 微服務實戰
- 筆記本電腦現場維修實錄
- MicroPython Cookbook
- Hands-On Game Development with WebAssembly
- 新型復印機·傳真機維修數據速查寶典
- 實戰Alibaba Sentinel:深度解析微服務高并發流量治理
- Hands-On Explainable AI(XAI) with Python
- Blender 2.6 Cycles:Materials and Textures Cookbook