{"id":13802610,"url":"https://github.com/mcauser/micropython-hdc1080","last_synced_at":"2025-03-25T12:26:31.522Z","repository":{"id":215934880,"uuid":"740013599","full_name":"mcauser/micropython-hdc1080","owner":"mcauser","description":"MicroPython driver for the HDC1080 temperature and humidity sensor","archived":false,"fork":false,"pushed_at":"2024-02-04T11:13:28.000Z","size":1342,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T07:14:44.535Z","etag":null,"topics":["hdc1080","humidity-sensor","micropython","temperature-sensor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcauser.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-01-07T08:50:24.000Z","updated_at":"2024-10-01T22:21:19.000Z","dependencies_parsed_at":"2024-02-04T12:30:41.568Z","dependency_job_id":null,"html_url":"https://github.com/mcauser/micropython-hdc1080","commit_stats":null,"previous_names":["mcauser/micropython-hdc1080"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-hdc1080","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-hdc1080/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-hdc1080/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-hdc1080/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcauser","download_url":"https://codeload.github.com/mcauser/micropython-hdc1080/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066712,"owners_count":20555430,"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":["hdc1080","humidity-sensor","micropython","temperature-sensor"],"created_at":"2024-08-04T00:01:48.471Z","updated_at":"2025-03-25T12:26:31.494Z","avatar_url":"https://github.com/mcauser.png","language":"Python","readme":"# MicroPython HDC1080 Temperature \u0026 Humidity Sensor\n\nA MicroPython library for the TI HDC1080 low power, high accuracy digital humidity and temperature sensor with I2C Interface.\n\n![demo](docs/hdc1080.jpg)\n\n### Installation\n\nUsing mip via mpremote:\n\n```bash\n$ mpremote mip install github:mcauser/micropython-hdc1080\n$ mpremote mip install github:mcauser/micropython-hdc1080/examples\n```\n\nUsing mip directly on a WiFi capable board:\n\n```python\n\u003e\u003e\u003e import mip\n\u003e\u003e\u003e mip.install(\"github:mcauser/micropython-hdc1080\")\n\u003e\u003e\u003e mip.install(\"github:mcauser/micropython-hdc1080/examples\")\n```\n\nManual installation:\n\nCopy `src/hdc1080.py` to the root directory of your device.\n\n## Examples\n\n**Basic usage**\n\n```python\nfrom machine import I2C, Pin\nfrom hdc1080 import HDC1080\n\ni2c = I2C(0)\ni2c.scan()\n# [64]\n\nhdc = HDC1080(i2c)\n\n# set humidity resolution (in bits)\nhdc.config(humid_res=8)\nhdc.config(humid_res=11)\nhdc.config(humid_res=14)\n# as resolution increases, conversion time increases\n# 8-bit 2.5ms, 11-bit 3.85ms, 14-bit 6.5ms\n\n# set temperature resolution (in bits)\nhdc.config(temp_res=11)\nhdc.config(temp_res=14)\n# as resolution increases, conversion time increases\n# 11-bit 3.65ms, 14-bit 6.35ms\n\n# set acquisition mode\nhdc.config(mode=0)\nhdc.config(mode=1)\n# 0 measure temp or humidity\n# 1 measure temp and humidity\n\n# toggle heater\nhdc.config(heater=0)\nhdc.config(heater=1)\n# 0 turns heater off\n# 1 turns heater on\n# heater can be used to test the sensor or drive off condensation after long exposure to high humidity\n\nhdc.temperature()\n# eg 20.78735\n\nhdc.humidity()\n# eg 60.83984\n\n# software reset\nhdc.reset()\n\n# look for the HDC1080 sensor on the I2C bus\nhdc.check()\n# returns True if the device was found, otherwise raises an OSError\n\nhdc.battery_status()\n# returns 0 if Vcc \u003e 2.8V\n# returns 1 if Vcc \u003c 2.8V\n# useful in low power battery powered systems, to inform user to replace batteries\n\nhdc.serial_number()\n# returns eg 9816972135, a 40-bit unique serial per individual HDC1080\n\nhdc.manufacturer_id()\n# returns 21577 or 0x5449\n# which can be represented as b'TI' for Texas Instruments\n\nhdc.device_id()\n# returns 4176 or 0x1050\n# don't ask me why it's 1050 and not 1080 - that's just how it is in the datasheet\n```\n\nFor more detailed examples, see [examples](/examples).\n\nIf you mip installed them above, you can run them like so:\n\n```python\nimport hdc1080.examples.basic\n```\n\n## Parts\n\n* [HDC1080 module](https://s.click.aliexpress.com/e/_DBqFmVn)\n* [TinyPICO](https://www.tinypico.com/)\n\n## Connections\n\n### TinyPICO ESP32\n\n```python\nfrom machine import SoftI2C, Pin\ni2c = SoftI2C(scl=Pin(22), sda=Pin(21))\n\nfrom machine import I2C, Pin\ni2c = I2C(0)\n```\n\nHDC1080 | TinyPICO (ESP32)\n------- | ----------------\nVCC     | 3V3\nGND     | GND\nSCL     | 22 (SCL)\nSDA     | 21 (SDA)\n\n## Links\n\n* [micropython.org](http://micropython.org)\n* [HDC1080 product page](https://www.ti.com/product/HDC1080)\n* [HDC1080 datasheet](docs/hdc1080.pdf)\n* [HDC1080 datasheet](https://www.ti.com/lit/ds/symlink/hdc1080.pdf)\n* [TinyPICO Getting Started](https://www.tinypico.com/gettingstarted)\n\n## License\n\nLicensed under the [MIT License](http://opensource.org/licenses/MIT).\n\nCopyright (c) 2024 Mike Causer\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Sensors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-hdc1080","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcauser%2Fmicropython-hdc1080","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-hdc1080/lists"}