- 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.
推薦閱讀
- 電腦軟硬件維修大全(實例精華版)
- Applied Unsupervised Learning with R
- 電腦組裝與維修從入門到精通(第2版)
- 施耐德SoMachine控制器應用及編程指南
- Manage Partitions with GParted How-to
- scikit-learn:Machine Learning Simplified
- 分布式微服務架構(gòu):原理與實戰(zhàn)
- 微軟互聯(lián)網(wǎng)信息服務(IIS)最佳實踐 (微軟技術(shù)開發(fā)者叢書)
- 筆記本電腦維修300問
- Python Machine Learning Blueprints
- Exceptional C++:47個C++工程難題、編程問題和解決方案(中文版)
- Machine Learning Projects for Mobile Applications
- USB 3.0編程寶典
- Arduino項目開發(fā):智能控制
- Raspberry Pi Media Center