{"id":16299515,"url":"https://github.com/fonger/esp8266-rtos-dht","last_synced_at":"2025-08-30T12:40:05.357Z","repository":{"id":77558452,"uuid":"207769551","full_name":"Fonger/ESP8266-RTOS-DHT","owner":"Fonger","description":"ESP8266_RTOS_SDK library for DHT11, DHT22 or SI7021","archived":false,"fork":false,"pushed_at":"2019-11-26T14:55:25.000Z","size":7,"stargazers_count":21,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T11:03:58.631Z","etag":null,"topics":["dht","dht11","dht22","esp8266","esp8266-rtos","si7021","temperature-sensor"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fonger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-11T09:04:31.000Z","updated_at":"2024-11-01T01:36:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0e50c7a-473e-4c0c-bd2c-69a8aba85d7e","html_url":"https://github.com/Fonger/ESP8266-RTOS-DHT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fonger/ESP8266-RTOS-DHT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fonger%2FESP8266-RTOS-DHT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fonger%2FESP8266-RTOS-DHT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fonger%2FESP8266-RTOS-DHT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fonger%2FESP8266-RTOS-DHT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fonger","download_url":"https://codeload.github.com/Fonger/ESP8266-RTOS-DHT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fonger%2FESP8266-RTOS-DHT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272852284,"owners_count":25004054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dht","dht11","dht22","esp8266","esp8266-rtos","si7021","temperature-sensor"],"created_at":"2024-10-10T20:48:20.277Z","updated_at":"2025-08-30T12:40:05.340Z","avatar_url":"https://github.com/Fonger.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266-RTOS-DHT\n\nESP8266_RTOS_SDK library for DHT11, DHT22 or SI7021.\nThis is a port from esp-open-rtos for espressif official SDK ESP8266_RTOS_SDK.\n\n## Compatibility\n\nespressif/ESP8266_RTOS_SDK v3.2+\n\n## Usage\n\nClone this project in your components folder.\n\n```c\n\n#include \u003cstdio.h\u003e\n\n#include \u003cfreertos/FreeRTOS.h\u003e\n#include \u003cfreertos/task.h\u003e\n\n#include \u003cesp_err.h\u003e\n#include \u003cdht/dht.h\u003e\n\n#define DHT_GPIO 5 // D1 pin\n\nvoid temperature_task(void *arg)\n{\n    ESP_ERROR_CHECK(dht_init(DHT_GPIO, false));\n    vTaskDelay(2000 / portTICK_PERIOD_MS);\n    while (1)\n    {\n        int humidity = 0;\n        int temperature = 0;\n        if (dht_read_data(DHT_TYPE_DHT22, DHT_GPIO, \u0026humidity, \u0026temperature) == ESP_OK) {\n            // e.g. in dht22, 604 = 60.4%, 252 = 25.2 C\n            // If you want to print float data, you should run `make menuconfig`\n            // to enable full newlib and call dht_read_float_data() here instead\n            printf(\"Humidity: %d Temperature: %d\\n\", humidity, temperature);\n        } else {\n            printf(\"Fail to get dht temperature data\\n\");\n        }\n        vTaskDelay(5000 / portTICK_PERIOD_MS);\n    }\n    vTaskDelete(NULL);\n}\n\nvoid app_main() {\n    xTaskCreate(temperature_task, \"temperature task\", 2048, NULL, tskIDLE_PRIORITY, NULL);\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonger%2Fesp8266-rtos-dht","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffonger%2Fesp8266-rtos-dht","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonger%2Fesp8266-rtos-dht/lists"}