{"id":16064669,"url":"https://github.com/eldruin/lm75-rs","last_synced_at":"2025-03-18T05:30:48.828Z","repository":{"id":48292018,"uuid":"153003554","full_name":"eldruin/lm75-rs","owner":"eldruin","description":"Platform-agnostic Rust driver for the LM75 temperature sensor and thermal watchdog.","archived":false,"fork":false,"pushed_at":"2024-01-18T08:17:06.000Z","size":56,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-16T05:28:12.873Z","etag":null,"topics":["driver","embedded","embedded-hal","embedded-hal-driver","i2c","no-std","rust","sensor","temperature","temperature-sensor","watchdog"],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2018-10-14T18:06:27.000Z","updated_at":"2024-03-14T17:59:42.000Z","dependencies_parsed_at":"2024-01-20T20:51:09.722Z","dependency_job_id":null,"html_url":"https://github.com/eldruin/lm75-rs","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":"0.014705882352941124","last_synced_commit":"225d4961e0ab53ab90b0acd5b694d4bfd4befd52"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Flm75-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Flm75-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Flm75-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Flm75-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldruin","download_url":"https://codeload.github.com/eldruin/lm75-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902822,"owners_count":20366358,"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":["driver","embedded","embedded-hal","embedded-hal-driver","i2c","no-std","rust","sensor","temperature","temperature-sensor","watchdog"],"created_at":"2024-10-09T05:09:03.445Z","updated_at":"2025-03-18T05:30:48.415Z","avatar_url":"https://github.com/eldruin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust LM75 Temperature Sensor and Thermal Watchdog Driver\n\n[![crates.io](https://img.shields.io/crates/v/lm75.svg)](https://crates.io/crates/lm75)\n[![Docs](https://docs.rs/lm75/badge.svg)](https://docs.rs/lm75)\n![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.62+-blue.svg)\n[![Build Status](https://github.com/eldruin/lm75-rs/workflows/Build/badge.svg)](https://github.com/eldruin/lm75-rs/actions?query=workflow%3ABuild)\n[![Coverage Status](https://coveralls.io/repos/github/eldruin/lm75-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/lm75-rs?branch=master)\n\nThis is a platform agnostic Rust driver for the LM75 temperature sensor and thermal watchdog, based on the\n[`embedded-hal`](https://github.com/rust-embedded/embedded-hal) traits.\n\nThis driver allows you to:\n\n- Enable/disable the device.\n- Read the temperature.\n- Set the fault queue.\n- Set the OS temperature.\n- Set the hysteresis temperature.\n- Set the OS operation mode.\n- Set the OS polarity.\n- Set the sample rate of temperature measurements (PCT2075 only)\n\n## The device\n\nThe LM75 temperature sensor includes a delta-sigma analog-to-digital converter, and a digital overtemperature detector.\nThe host can query the LM75 through its I2C interface to read temperature at any time. The open-drain overtemperature\noutput (OS) sinks current when the programmable temperature limit is exceeded. The OS output operates in either of two\nmodes, comparator or interrupt. The host controls the temperature at which the alarm is asserted (TOS) and the\nhysteresis temperature below which the alarm condition is not valid (THYST). Also, the LM75's TOS and THYST registers\ncan be read by the host. The address of the LM75 is set with three pins to allow multiple devices to work on the same\nbus. Power-up is in comparator mode, with defaults of TOS= +80ºC and THYST= +75ºC. The 3.0V to 5.5V supply voltage\nrange, low supply current, and I2C interface make the LM75 ideal for many applications in thermal management and\nprotection.\n\nDatasheet:\n\n- [LM75](https://datasheets.maximintegrated.com/en/ds/LM75.pdf)\n\nThis driver is also compatible with at least [LM75A], [LM75B, LM75C],\n[AT30TS75A], [DS1775], [DS75], [DS7505], [G751], [MAX7500/1/2/3/4], [MAX6625], [MCP9800/1/2/3],\n[STDS75], [TCN75], [PCT2075].\n\n[AT30TS75A]: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8839-DTS-AT30TS75A-Datasheet.pdf\n[DS1775]: https://datasheets.maximintegrated.com/en/ds/DS1775-DS1775R.pdf\n[DS75]: https://datasheets.maximintegrated.com/en/ds/DS75.pdf\n[DS7505]: https://datasheets.maximintegrated.com/en/ds/DS7505.pdf\n[G751]: http://www.gmt.com.tw/product/datasheet/EDS-751.pdf\n[LM75A]: https://www.nxp.com/docs/en/data-sheet/LM75A.pdf\n[LM75B, LM75C]: http://www.ti.com/lit/ds/symlink/lm75b.pdf\n[MAX6625]: https://datasheets.maximintegrated.com/en/ds/MAX6625-MAX6626.pdf\n[MAX7500/1/2/3/4]: https://datasheets.maximintegrated.com/en/ds/MAX7500-MAX7504.pdf\n[MCP9800/1/2/3]: http://ww1.microchip.com/downloads/en/DeviceDoc/21909d.pdf\n[STDS75]: https://www.st.com/resource/en/datasheet/stds75.pdf\n[TCN75]: http://ww1.microchip.com/downloads/en/DeviceDoc/21490D.pdf\n[PCT2075]: https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf\n\n### Usage\n\nPlease find additional examples using hardware in this repository: [driver-examples]\n\n[driver-examples]: https://github.com/eldruin/driver-examples\n\n```rust\nuse linux_embedded_hal::I2cdev;\nuse lm75::{Lm75, Address};\n\nfn main() {\n    let dev = I2cdev::new(\"/dev/i2c-1\").unwrap();\n    let address = Address::default();\n    let mut sensor = Lm75::new(dev, address);\n    let temp_celsius = sensor.read_temperature().unwrap();\n    println!(\"Temperature: {}ºC\", temp_celsius);\n}\n```\n\n## Support\n\nFor questions, issues, feature requests and other changes, as well as if you\nare interested in supporting a similar sensor, please file an\n[issue in the github project](https://github.com/eldruin/lm75-rs/issues).\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate is guaranteed to compile on stable Rust 1.62 and up. It *might*\ncompile with older versions but that may change in any new patch release.\n\nThe MSRV will not be updated in any patch release.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as\ndefined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Flm75-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldruin%2Flm75-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Flm75-rs/lists"}