javieryanez / nodemcu-modules

Modules for nodeMcu (LUA intepreter for ESP8266)
76 stars 47 forks source link

no useful values from dht22 #1

Open thk4711 opened 9 years ago

thk4711 commented 9 years ago

Hi,

i uploaded the dht22.lua module to the esp8266. Then I executed your example. I am getting no useful results: Temperature: -3277.3 deg C Temperature: -5867.9 deg F Humidity: -1.9% I connected the DHT22 on pin1 to 3.3V pins to GPIO2 (with 4.7k to 3.3V) 3 is unused and pin4 to GND. Is there something wrong with my setup ? When I use a DS18b20 with the example from the nodemcu firmware it works. What is also strange is the fact that after executing the dht22 script the esp8622 is no longer responding in the serial interface and has to be restarted.

Thomas

javieryanez commented 9 years ago

Hi Thomas,

You are using the latest version of the module? In the latest version (three days ago) on error humidity should the value -1.

I use the same connections, but without resistor.

What version of nodemcu you use ?, I've tried with 20140108

Regards,

Javier

jescarri commented 9 years ago

I made a pull request to solve this. https://github.com/javieryanez/nodemcu-modules/pull/4 It seems that the DHT wasn't being initialized in the correct way. http://playground.arduino.cc/Main/DHTLib

Gracias por compartir la libreria!.

javieryanez commented 9 years ago

Hi Jesus,

thanks for your help in the library. Lately I could not spend time in nodemcu. I accepted the request pull without checking, I trust you.

Espero poder encontrar tiempo para retomar el tema!

jescarri commented 9 years ago

Hey Javier, I'm new to nodemcu, ').

Espero funcione bien. Saludos!

rosch85 commented 7 years ago

Hi Javier,

i'm having the same problem as described here. Do you have any further advice that might help?

Cheers, Sebastian

jescarri commented 7 years ago

Hey rosch85 DHT support has been added to nodemcu firmware, there is no need for any external dependency. https://github.com/jescarri/nodemcu-dht22-mqtt check that code, is using that functionality, also please beware that the DHT power is connected to a NodeMCU pin, and is powered on the fly.

Hope it helps.