- 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.
推薦閱讀
- Learning Cocos2d-x Game Development
- 網(wǎng)絡(luò)服務(wù)器配置與管理(第3版)
- 數(shù)字道路技術(shù)架構(gòu)與建設(shè)指南
- 嵌入式系統(tǒng)設(shè)計(jì)教程
- 筆記本電腦維修不是事兒(第2版)
- 分布式系統(tǒng)與一致性
- 分布式微服務(wù)架構(gòu):原理與實(shí)戰(zhàn)
- 龍芯自主可信計(jì)算及應(yīng)用
- 超大流量分布式系統(tǒng)架構(gòu)解決方案:人人都是架構(gòu)師2.0
- LPC1100系列處理器原理及應(yīng)用
- Neural Network Programming with Java(Second Edition)
- RISC-V處理器與片上系統(tǒng)設(shè)計(jì):基于FPGA與云平臺(tái)的實(shí)驗(yàn)教程
- WebGL Hotshot
- 嵌入式系統(tǒng)原理及應(yīng)用:基于ARM Cortex-M4體系結(jié)構(gòu)
- Blender 3D By Example