{"id":16064713,"url":"https://github.com/eldruin/tmp1x2-rs","last_synced_at":"2025-10-04T02:23:23.690Z","repository":{"id":57669968,"uuid":"154566960","full_name":"eldruin/tmp1x2-rs","owner":"eldruin","description":"Platform-agnostic Rust driver for the TMP102 and TMP112 digital temperature sensors","archived":false,"fork":false,"pushed_at":"2025-06-27T07:10:50.000Z","size":85,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-05T05:55:27.660Z","etag":null,"topics":["driver","embedded","embedded-hal","embedded-hal-driver","i2c","no-std","rust","sensor","temperature","temperature-sensor"],"latest_commit_sha":null,"homepage":"https://blog.eldruin.com/tmp1x2-temperature-sensor-driver-in-rust/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eldruin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2018-10-24T20:44:55.000Z","updated_at":"2025-06-27T07:10:53.000Z","dependencies_parsed_at":"2024-10-27T15:34:45.802Z","dependency_job_id":"cd7a061d-2bc6-4193-91d5-1dae3f0b14b8","html_url":"https://github.com/eldruin/tmp1x2-rs","commit_stats":{"total_commits":72,"total_committers":1,"mean_commits":72.0,"dds":0.0,"last_synced_commit":"ba933eeae8fa6c0060911a685fd869a8312e4d57"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eldruin/tmp1x2-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Ftmp1x2-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Ftmp1x2-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Ftmp1x2-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Ftmp1x2-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldruin","download_url":"https://codeload.github.com/eldruin/tmp1x2-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Ftmp1x2-rs/sbom","scorecard":{"id":371738,"data":{"date":"2025-08-11","repo":{"name":"github.com/eldruin/tmp1x2-rs","commit":"78c1ce55312b63b9124c41d8c5808a2a818aacb9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/tmp1x2-rs/build.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T13:08:46.819Z","repository_id":57669968,"created_at":"2025-08-18T13:08:46.819Z","updated_at":"2025-08-18T13:08:46.819Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254615,"owners_count":25956633,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["driver","embedded","embedded-hal","embedded-hal-driver","i2c","no-std","rust","sensor","temperature","temperature-sensor"],"created_at":"2024-10-09T05:09:13.643Z","updated_at":"2025-10-04T02:23:23.685Z","avatar_url":"https://github.com/eldruin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust TMP102 and TMP112 Temperature Sensor Driver\n\n[![crates.io](https://img.shields.io/crates/v/tmp1x2.svg)](https://crates.io/crates/tmp1x2)\n[![Docs](https://docs.rs/tmp1x2/badge.svg)](https://docs.rs/tmp1x2)\n![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.75+-blue.svg)\n[![Build Status](https://github.com/eldruin/tmp1x2-rs/workflows/Build/badge.svg)](https://github.com/eldruin/tmp1x2-rs/actions?query=workflow%3ABuild)\n[![Coverage Status](https://coveralls.io/repos/github/eldruin/tmp1x2-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/tmp1x2-rs?branch=master)\n\nThis is a platform agnostic Rust driver for the TMP102 and TMP112\nhigh-accuracy, low-power, digital temperature sensors, using the\n[`embedded-hal`] traits.\n\nThis driver allows you to:\n- Change into one-shot or continuous conversion mode.\n- Read the temperature.\n- Enable/disable the extended measurement mode.\n- Trigger a one-shot measurement.\n- Read whether the one-shot measurement result is ready.\n- Set the conversion rate.\n- Set the high/low temperature threshold.\n- Set the fault queue.\n- Set the alert polarity.\n- Set the thermostat mode.\n- Read whether a comparator mode alert is active.\n\n[Introductory blog post](https://blog.eldruin.com/tmp1x2-temperature-sensor-driver-in-rust/)\n\n## The devices\n\nThis driver is compatible with both the TMP102 device as well as the TMP112\nfamily of devices, including TMP112A, TMP112B and TMP112N.\n\nThese temperature sensors are highly linear and do not require complex\ncalculations or lookup tables to derive the temperature. The on-chip\n12-bit ADC offers resolutions down to 0.0625°C.\n\nThe TMP102 device is a digital temperature sensor ideal for NTC/PTC\nthermistor replacement where high accuracy is required. The device offers an\naccuracy of +/-0.5°C without requiring calibration or external component\nsignal conditioning.\n\nThe TMP112 family of devices are digital temperature sensors designed for\nhigh-accuracy, low-power, NTC/PTC thermistor replacements where high accuracy\nis required. The TMP112A and TMP112B offers 0.5°C accuracy and are optimized\nto provide the best PSR performance for 3.3V and 1.8V operation respectively,\nwhile TMP112N offers 1°C accuracy.\n\nThe devices feature SMBus(TM), two-wire and I2C interface compatibility,\nand allows up to four devices on one bus.\n\nDatasheets:\n- [TMP102](http://www.ti.com/lit/ds/symlink/tmp102.pdf)\n- [TMP112x](http://www.ti.com/lit/ds/symlink/tmp112.pdf)\n\n### Usage\n\nPlease find additional examples using hardware in this repository: [driver-examples]\n\n```rust\nuse linux_embedded_hal::I2cdev;\nuse tmp1x2::{Tmp1x2, SlaveAddr};\n\nfn main() {\n    let dev = I2cdev::new(\"/dev/i2c-1\").unwrap();\n    let address = SlaveAddr::default();\n    let mut sensor = Tmp1x2::new(dev, address);\n    let temperature = sensor.read_temperature().unwrap();\n    println!(\"Temperature: {:.1}ºC\", temperature);\n}\n```\n\nAdditionally, async support can be enabled via the `async` feature. For example:  \n`cargo build --features async`\n\n## Support\n\nFor questions, issues, feature requests, and other changes, please file an\n[issue in the github project](https://github.com/eldruin/tmp1x2-rs/issues).\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\n[driver-examples]: https://github.com/eldruin/driver-examples\n[`embedded-hal`]: https://github.com/rust-embedded/embedded-hal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Ftmp1x2-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldruin%2Ftmp1x2-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Ftmp1x2-rs/lists"}