官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 民县| 海晏县| 阳城县| 吐鲁番市| 辽源市| 苗栗县| 万安县| 兴安县| 宝应县| 湘乡市| 虎林市| 邵阳县| 汾阳市| 金寨县| 揭阳市| 沧源| 民权县| 苍溪县| 汉源县| 垣曲县| 从化市| 文昌市| 荔波县| 高雄县| 栾城县| 嫩江县| 庆元县| 孟津县| 禄劝| 谢通门县| 房产| 晋中市| 申扎县| 平顶山市| 泉州市| 喀喇沁旗| 新乐市| 拉孜县| 巧家县| 始兴县| 张家川|