eadf / esp8266_dhtxx

ESP8266 - Driver for the temperature and humidity sensor DHT11 and DHT22

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP8266 - Driver for the temperature and humidity sensor DHT11 and DHT22

I've modified CHERTS's driver to allow you to connect DHTxx sensors to any of the GPIO pins.
I also made this project into a pure driver.

Clone this project (and easygpio) inside your own project and point your MODULES variable in the Makefile to those folders.

For a single device, connect as follows DHT22/DHT11 to ESP:
DHT 1 (Vcc) to Vcc (3.3 Volts) ESP
DHT 2 (DATA_OUT) to your ESP GPIO
DHT 3 (NC)
DHT 4 (GND) to ESP GND
Connect a 5KΩ resistor between Vcc and the DATA_OUT pin. If you are using several sensors you will need one such pullup resistor per sensor.

You can connect any GPIO to a DHTxx sensor, including GPIO16. But i don't recommend using GPIO15. A DHT pullup resistor (on GPIO15) will cause the ESP to boot in "Boot from SD-card" mode.

About

ESP8266 - Driver for the temperature and humidity sensor DHT11 and DHT22

License:MIT License


Languages

Language:C 52.1%Language:Makefile 35.3%Language:C++ 12.6%