简体   繁体   English

Esp8266 DHT11湿度和温度,但无法从DHT传感器读取

[英]Esp8266 DHT11 Humidity & Temperature but Failed to read from DHT sensor

Help please I'm trying to get the sensor values from DHT11 Humidity & Temperature Sensor but the Esp8266 is connecting to internet but is not reading the value from the sensor. 请帮忙,我试图从DHT11湿度和温度传感器获取传感器值,但是Esp8266正在连接到Internet,但没有从传感器读取该值。

I'm using Blynk to display the sensor value 我正在使用Blynk显示传感器值

this is what appears in my monitors Serial

21:41:24.811 -> �����������������������������������������������������������������������������������������������[24759] Connected to WiFi
21:41:26.726 -> [24759] IP: 192.168.1.9
21:41:26.760 -> [24759] 
21:41:26.760 -> ___ __ __
21:41:26.796 -> / _ )/ /_ _____ / /__
21:41:26.796 -> / _ / / // / _ \/ '_/
21:41:26.832 -> /____/_/\_, /_//_/_/\_\
21:41:26.865 -> /___/ v0.5.4 on NodeMCU
21:41:26.903 -> 
21:41:26.903 -> [24837] Connecting to blynk-cloud.com:80
21:41:30.876 -> [28951] Ready (ping: 23ms).
21:41:34.230 -> Failed to read from DHT sensor!
21:41:34.940 -> Failed to read from DHT sensor!
21:42:56.217 -> Failed to read from DHT sensor!

my code 我的密码

my current circuit diagram 我目前的电路图

  • Double check the connection of sensor and its variable define in code, it has to be the same, most projects with esp use D4 for dht input. 仔细检查传感器的连接及其变量在代码中定义,它必须相同,大多数带有esp的项目都将D4用于dht输入。
  • Try to put 4k7 to 10k resistor between +VCC and dht's data out pin. 尝试在+ VCC和dht的数据输出引脚之间放置4k7至10k电阻。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM