{"id":23802363,"url":"https://github.com/technosf/esp32-peripheral-drivers","last_synced_at":"2026-03-03T23:02:05.307Z","repository":{"id":46451885,"uuid":"194709317","full_name":"technosf/ESP32-Peripheral-Drivers","owner":"technosf","description":"ESP32 Peripheral Drivers built with ESP-IDF","archived":false,"fork":false,"pushed_at":"2024-03-12T20:38:49.000Z","size":148,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T08:54:35.816Z","etag":null,"topics":["1wire","dht22","drivers","ds18s20","esp-idf","esp32","humidity","max6675","onewire","spi","temperature"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technosf.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-07-01T16:38:27.000Z","updated_at":"2024-03-01T06:55:33.000Z","dependencies_parsed_at":"2025-02-21T16:44:53.128Z","dependency_job_id":"5152de7d-4601-49c0-aeba-09178210c4e6","html_url":"https://github.com/technosf/ESP32-Peripheral-Drivers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/technosf/ESP32-Peripheral-Drivers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technosf%2FESP32-Peripheral-Drivers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technosf%2FESP32-Peripheral-Drivers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technosf%2FESP32-Peripheral-Drivers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technosf%2FESP32-Peripheral-Drivers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technosf","download_url":"https://codeload.github.com/technosf/ESP32-Peripheral-Drivers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technosf%2FESP32-Peripheral-Drivers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30064790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["1wire","dht22","drivers","ds18s20","esp-idf","esp32","humidity","max6675","onewire","spi","temperature"],"created_at":"2025-01-01T22:21:05.870Z","updated_at":"2026-03-03T23:02:05.292Z","avatar_url":"https://github.com/technosf.png","language":"C++","readme":"# ESP32 Peripheral Drivers\nESP32 Peripheral Drivers built with ESP-IDF\n\nThis top-level driver collection provide high-level functions to operate the peripherals. If you are using *ESP-IDF* and *cmake*, clone it into the *components* directory of your project.\n\n\n## The Drivers\n\n### Released\n\n#### MAX6675\n\nThe _MAX6675_ is a SPI temperature sensor interface for K-type thermocouples. It measures from 0°C to 1023°C in 0.25°C increments. This driver can read and return Celsius, Fahrenheit and the raw data produced by the sensor.\n\n\n### In Progress\n\n#### DHT22\n\nThe _DHT22_ is a temperature and humidity sensor that runs off 3V-5V and uses single-wire signaling to initiate and transmit its readings along with a checksum, with one reading being available up to one every two seconds. \n\nThis driver uses the ESP32 _RMT_ device to capture the input from the DHT22. It uses a single _RMT_ device and one _RMT_ memory block only (i.e. it can use any one RMT device, even #7). By pulling the GPIO low this driver causes the DHT22 to signal a start pulse and following 40 data bits which are captured by the RMT and processed into five bytes. The start pulse is typically low 80µs + high 80µs, while each data bit pulse is low 50-70µs followed by a high of 25-30µs for 0 or a high of 70-80µs for 1. \n\nThe processed data status, the  temperature (Celsius) and humidity (percent) can be read from the API, as can the raw 40 bit signal data. Looking for prior art for the _RMT_ approach, [jcollie's repo](https://github.com/jcollie/esp32DHT) provided proof of concept.\n\n#### DS18B20\n\nThe _DS18B20_ is a temperature sensor that uses the Dallas 1Wire bus for signaling and communication, and either runs off a 3V-5V supply or off power from the signaling wire parasistically. It measures from -55°C to +125°C and has selectable accuracy, from 9 to 12 bits. Multiple devices can run off the Dallas 1Wire bus as each is uniquely addressed. Upper and Lower temperature limits can be configured in each _DS18B20_ which if met will set the devices alarm state: A controller on the Dallas 1Wire bus can search the bus for devices with alarm states using an Alarm Search command, and without having to interogate each device on the bus.\n\n\n### Examples\n\n#### MAX6675\n```C++\n    #include \u003cesp_system.h\u003e\n    #include \u003cfreertos/FreeRTOS.h\u003e\n    #include \u003cfreertos/task.h\u003e\n    #include \u003cmath.h\u003e\n\n    #include \"MAX6675.h\"\n\n    void app_main()\n    {\n        epd::MAX6675* max6675 = new epd::DS18B20(epd::MAX6675::SPI2);\n\n        while (true)\n        {\n            printf(\"temp R=%u\\n\",  max6675-\u003egetRaw().temperature_reading);\n            printf(\"temp C=%f\\n\",  max6675-\u003egetCelsius(false));\n            printf(\"temp F=%f\\n\",  max6675-\u003egetFahrenheit(false));\n            vTaskDelay(20);\n        }\n    }\n```\n\n## License\n\nESP32-Peripheral-Drivers - Copyright 2019  technosf  [http://github.com/technosf]\n\nLicensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 or greater (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\nhttp://www.gnu.org/licenses/gpl-3.0.en.html\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n![glp3 logo](http://www.gnu.org/graphics/gplv3-88x31.png)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnosf%2Fesp32-peripheral-drivers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnosf%2Fesp32-peripheral-drivers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnosf%2Fesp32-peripheral-drivers/lists"}