{"id":22117984,"url":"https://github.com/makeshiftmaker/dht11","last_synced_at":"2025-03-24T06:15:57.861Z","repository":{"id":234580667,"uuid":"789182645","full_name":"MakeshiftMaker/DHT11","owner":"MakeshiftMaker","description":"A C-Library for reading Humidity and Temperature Data from the DHT11 Humiture sensor on a Rasberry-Pi","archived":false,"fork":false,"pushed_at":"2024-04-20T10:04:39.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T11:49:06.657Z","etag":null,"topics":["dht11","dht11-sensor","iot","rasberry","rasberry-pi","sensors","wiringpi"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MakeshiftMaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-04-19T21:48:22.000Z","updated_at":"2024-05-20T11:18:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb84ea6c-65ed-401b-86f7-923ed0449c32","html_url":"https://github.com/MakeshiftMaker/DHT11","commit_stats":null,"previous_names":["makeshiftmaker/dht11"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakeshiftMaker%2FDHT11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakeshiftMaker%2FDHT11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakeshiftMaker%2FDHT11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakeshiftMaker%2FDHT11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MakeshiftMaker","download_url":"https://codeload.github.com/MakeshiftMaker/DHT11/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217945,"owners_count":20579300,"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","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":["dht11","dht11-sensor","iot","rasberry","rasberry-pi","sensors","wiringpi"],"created_at":"2024-12-01T13:42:39.090Z","updated_at":"2025-03-24T06:15:57.835Z","avatar_url":"https://github.com/MakeshiftMaker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## DHT11 Rasberry-Pi C Readout\n\nThis library can be used to read Humidity and Temperature data from the DHT11 Humidture sensor.\nThe library is written in C and tested on a Rasberry-Pi 4\n\n## Installation\n\nClone this repository to your local machine\n\n```git clone https://github.com/MakeshiftMaker/DHT11```\n\n## Usage\n\nInclude the DHT11.h header file in your C file:\n\n```#include \"DHT11.h\"```\n\nCompile your C file and link against the DHT11 library:\n\n\n\n```gcc -o your_program your_file.c DHT11.c```\n\nor if it's not located in your project folder\n\n```gcc -I ../DHT11 -o your_program your_file.c ../DHT11/DHT11.c```\n\nThe library comes with the function readDHT(int dhtPin):\n\nthe dhtPin being the GPIO pin on your Pi to which youve hooked up your DATA pin on the DHT11. (using the WiringPi GPIO numbering scheme)\n\nThe function returns a pointer to an Array which contains Integral and Decimal Humidity/Temperature values and a checksum.\n\nIf the checksum doesnt check out, or the program cant read a bit for whatever reason (it happens every now and then) it returns a NULL-pointer\n\n## Usage Example\n\n```\n#define DHTPIN 26\n\nfor(int i = 0 ; i \u003c 100 ; i++){\n        delay(1000); //delay 1 sec for DHT \"cooldown\"\n        int* dht_data = readDHT(DHTPIN);\n        if(dht_data == NULL){ //check if something went wrong\n            printf(\"%d: Checksum Error\\n\", i);\n        }\n        else{\n            printf(\"%d: Humidity: %d.%d%%\\nTemperature: %d.%dC\\n\", i, dht_data[0], dht_data[1], dht_data[2], dht_data[3]); \n        }\n    }\n```\n\nthis program reads out the values from the Sensor 100 times and prints them if the data is in tact\n\nThe datasheet advises to give the Sensor about 1 second between each readout, or else it might not be able to keep up.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakeshiftmaker%2Fdht11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakeshiftmaker%2Fdht11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakeshiftmaker%2Fdht11/lists"}