{"id":13612986,"url":"https://github.com/neliogodoi/MicroPython-SI1145","last_synced_at":"2025-04-13T15:32:18.070Z","repository":{"id":81139125,"uuid":"120137318","full_name":"neliogodoi/MicroPython-SI1145","owner":"neliogodoi","description":"Driver to digital sensor of UV Index/IR/Visible Light/Proximity","archived":false,"fork":false,"pushed_at":"2020-04-03T18:16:25.000Z","size":23,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T12:36:22.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/neliogodoi.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}},"created_at":"2018-02-03T22:59:21.000Z","updated_at":"2023-07-04T22:35:26.000Z","dependencies_parsed_at":"2023-06-07T18:15:22.351Z","dependency_job_id":null,"html_url":"https://github.com/neliogodoi/MicroPython-SI1145","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neliogodoi%2FMicroPython-SI1145","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neliogodoi%2FMicroPython-SI1145/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neliogodoi%2FMicroPython-SI1145/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neliogodoi%2FMicroPython-SI1145/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neliogodoi","download_url":"https://codeload.github.com/neliogodoi/MicroPython-SI1145/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248735854,"owners_count":21153485,"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":[],"created_at":"2024-08-01T20:00:37.653Z","updated_at":"2025-04-13T15:32:17.817Z","avatar_url":"https://github.com/neliogodoi.png","language":"Python","readme":"# MicroPython-SI1145\n## SI1145: A digital sensor of UV Index/IR/Visible Light/Proximity\nThe SI1145 is a sensor from Silicon Laboratories with a calibrated light sensing algorithm that can calculate UV Index.\n### DataSheet: \nhttps://www.silabs.com/documents/public/data-sheets/Si1145-46-47.pdf\n### Features:\n - IR Sensor Spectrum: Wavelength: 550nm-1000nm (centered on 800)\n - Visible Light Sensor Spectrum: Wavelength: 400nm-800nm (centered on 530)\n - Voltage Supply: Power with 3-5VDC\n - Output Type: I2C address 0x60 (7-bit)\n - Operating Temperature: -40°C ~ 85°C\n## Driver version for developers\nThe driver version for developers (si1145-dev.py) is slightly larger in size as it contains comments to help understanding\n## Testing\nDownload one of the following codes for your device:\n#### ESP8266\n```python\n# ESP8266 simple teste\nimport machine\nimport si1145\nimport time\ni2c = machine.I2C(\n    sda=machine.Pin(4),\n    scl=machine.Pin(5))\nsensor = si1145.SI1145(i2c=i2c)\nfor i in range(10):\n    uv = sensor.read_uv\n    ir = sensor.read_ir\n    view = sensor.read_visible\n    print(\" UV: %f\\n IR: %f\\n Visible: %f\" % (uv, ir, view))\n    time.sleep(1)\n```\n#### ESP32\n```python\n# ESP32 simple teste\nimport machine\nimport si1145\nimport time\ni2c = machine.I2C(\n    sda=machine.Pin(21),\n    scl=machine.Pin(22))\nsensor = si1145.SI1145(i2c=i2c)\nfor i in range(10):\n    uv = sensor.read_uv\n    ir = sensor.read_ir\n    view = sensor.read_visible\n    print(\" UV: %f\\n IR: %f\\n Visible: %f\" % (uv, ir, view))\n    time.sleep(1)\n```\n#### LoPy\n```python\n# LoPy simple teste\nfrom machine import I2C\nimport si1145\nimport time\ni2c = I2C(0, I2C.MASTER, baudrate=100000)\nsensor = si1145.SI1145(i2c=i2c)\nfor i in range(10):\n    uv = sensor.read_uv\n    ir = sensor.read_ir\n    view = sensor.read_visible\n    print(\" UV: %f\\n IR: %f\\n Visible: %f\" % (uv, ir, view))\n    time.sleep(1)\n```\n#### BBC Micro:bit\n```python\n# Micro:bit simple teste\nfrom microbit import i2c\nimport si1145\nimport time\n\nsensor = si1145.SI1145(i2c=i2c)\nfor i in range(10):\n    uv = sensor.read_uv()\n    ir = sensor.read_ir()\n    view = sensor.read_visible()\n    print(\" UV: {}\\n IR: {}\\n Visible: {}\".format(uv, ir, view))\n    time.sleep(1)\n```\n","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Sensors","传感器"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneliogodoi%2FMicroPython-SI1145","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneliogodoi%2FMicroPython-SI1145","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneliogodoi%2FMicroPython-SI1145/lists"}