DHT11 not reading with nodemcu. Help, I'm new! #5535
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 1 comment
-
Posted at 2016-08-12 by DrAzzy Try putting a 1k pullup to Vcc on the data line. Also, DHT11's are terrible - the temperature is okay, the humidity is very often totally bogus. The DHT22 sucks less. Both of them will instantly fail if you connect power backwards, so don't do that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-08-12 by greg
I am simply trying to get the DHT11 to display the temperature in the console of the web IDE through my nodemcu. I'm very new at this, but must be doing something wrong. I modified the code found here: http://www.espruino.com/DHT11 It is constantly returning -1 for both temperature and humidity. If I disconnect everything, it still shows "-1" ...so I'm apparently receiving no data?
I've tried to get it working in two ways:
Using "NodeMCU" in the code:
Declaring pins directly:
Attached is a GPIO reference picture that matches my nodemcu.
The DHT11 unit I'm using an Osepp DHT11 unit. More info: http://osepp.com/products/sensors-arduino-compatible/humidity-temperature-sensor/
What am I missing? Do I need some type of resistor in the mix? Have I connected it wrong? This is my first project, an any help you can give me would be greatly appreciated! Thanks!
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions