- 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.
推薦閱讀
- Deep Learning with PyTorch
- 嵌入式技術基礎與實踐(第5版)
- 3ds Max Speed Modeling for 3D Artists
- 單片機原理及應用系統設計
- Camtasia Studio 8:Advanced Editing and Publishing Techniques
- Large Scale Machine Learning with Python
- OUYA Game Development by Example
- Visual Media Processing Using Matlab Beginner's Guide
- Spring Cloud微服務架構實戰(zhàn)
- BeagleBone Robotic Projects
- Wireframing Essentials
- FL Studio Cookbook
- Arduino項目開發(fā):智能生活
- 單片機原理及應用
- 計算機組裝、維護與維修項目教程