{"id":28056462,"url":"https://github.com/import-tiago/lib-lmt01","last_synced_at":"2026-04-29T23:31:58.812Z","repository":{"id":292007525,"uuid":"979512554","full_name":"import-tiago/Lib-LMT01","owner":"import-tiago","description":"LMT01 digital temperature sensor (Texas Instruments) – An Arduino-compatible library using a pulse-counting method and hardware timer.","archived":false,"fork":false,"pushed_at":"2025-05-10T16:53:34.000Z","size":1898,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T07:00:06.822Z","etag":null,"topics":["arduino","esp32","lmt01","lmt01-arduino","lmt01-esp32","lmt01-library","platformio","sensor","temperature","temperature-sensor"],"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/import-tiago.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,"zenodo":null}},"created_at":"2025-05-07T16:17:30.000Z","updated_at":"2025-05-10T22:31:33.000Z","dependencies_parsed_at":"2025-05-07T17:37:47.292Z","dependency_job_id":null,"html_url":"https://github.com/import-tiago/Lib-LMT01","commit_stats":null,"previous_names":["import-tiago/lmt01-library","import-tiago/lib-lmt01"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/import-tiago%2FLib-LMT01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/import-tiago%2FLib-LMT01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/import-tiago%2FLib-LMT01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/import-tiago%2FLib-LMT01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/import-tiago","download_url":"https://codeload.github.com/import-tiago/Lib-LMT01/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253692388,"owners_count":21948316,"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":["arduino","esp32","lmt01","lmt01-arduino","lmt01-esp32","lmt01-library","platformio","sensor","temperature","temperature-sensor"],"created_at":"2025-05-12T07:00:13.576Z","updated_at":"2026-04-29T23:31:58.769Z","avatar_url":"https://github.com/import-tiago.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LMT01 Temperature Sensor Library (ESP32 + Arduino)\n\nAn Arduino-compatible library for the **ESP32** platform that interfaces with the Texas Instruments **LMT01** digital temperature sensor using a **pulse-counting** method and hardware timer.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/part.png\" alt=\"Part Image\" width=\"300\"\u003e\n\u003c/p\u003e\n\n## Key Features\n\n- Works with ESP32 (Arduino framework)\n- No analog pins required — digital pulses are counted instead\n- Hardware timer-based measurement window\n- Temperature output in Celsius\n- Ultra-low power consumption: typically 34 µA to 125 µA during the temperature-to-digital conversion process.\n- High accuracy: ±0.5 °C (–20 °C to 90 °C), ±0.625 °C (90 °C to 150 °C), ±0.7 °C (–50 °C to –20 °C)\n\n## Basic Usage\n\n```cpp\n#include \"LMT01.h\"\n\n#define LMT01_PULSES_PIN 41\n#define LMT01_PWR_PIN 2\n\nLMT01 sensor(LMT01_PULSES_PIN, LMT01_PWR_PIN, 130); // 130ms window\n\nvoid setup() {\n    Serial.begin(19200);\n    sensor.begin();\n}\n\nvoid loop() {\n    if (sensor.ready()) {\n        float temp = sensor.read();\n        Serial.printf(\"%.2f %cC\\n\", temp, 176);\n    }\n}\n```\n\n\u003e Note: This library is designed specifically for ESP32 boards using the Arduino framework. It uses hw_timer_t and attachInterrupt for reliable pulse measurement.\n\n## Basic Circuit\n![LMT01 basic circuit](assets/circuit.png)\n\u003e Internal pull-up enabled by the library.\n\n## Serial Output\n![LMT01 serial output](assets/terminal.png)\n\u003e Temperature variation from an ambient temperature of around 25 °C up to approximately 60 °C (achieved by placing the sensor in contact with water preheated in the microwave for about 40 seconds).\n\n# Concepts ([Datasheet](assets/LMT01.pdf))\n## Time Window Definition\n![LMT01 Time Window](assets/time_window.png)\n\n## Transfer Function\nThe output transfer function is approximately linear and can be expressed as:\n\n$$\n\\text{Temp} = \\left( \\frac{\\text{PC}}{4096} \\times 256^\\circ\\text{C} \\right) - 50^\\circ\\text{C}\n$$\n\nWhere:\n- **PC** is the number of pulses counted within the defined time window.\n- **Temp** is the resulting temperature in degrees Celsius.\n\n## Compatibility\nThis library was tested with:\n\n- **ESP32 Arduino Core v3.2.0**  \n  Based on **ESP-IDF v5.4.1**  \n  🔗 [GitHub Release: espressif/arduino-esp32 v3.2.0](https://github.com/espressif/arduino-esp32/releases/tag/3.2.0)\n\n\u003e For best results, ensure you are using this version or later of the ESP32 Arduino core.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimport-tiago%2Flib-lmt01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimport-tiago%2Flib-lmt01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimport-tiago%2Flib-lmt01/lists"}