ricky1118 / esp32-DHT11

Esp-idf driver for DHT11 temperature and humidity sensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32-DHT11

Esp-idf driver for DHT11 temperature and humidity sensor

Install

Use Platformio to install this link
or
Clone this repo inside [esp]/esp-idf/components folder

How to use

Import dht11.h inside your program, initialize the device with DHT11_init(gpio_num) and then call DHT11_read() whenever you need to read from the DHT11 sensor.
DHT11_read() returns a struct with temperature and humidity and a status code of the operation for error checking.

Check the examples folder for more information.

WARNING: DHT11_read() is a blocking function.

About

Esp-idf driver for DHT11 temperature and humidity sensor

License:MIT License


Languages

Language:C 98.7%Language:Makefile 1.3%