{"id":16064701,"url":"https://github.com/eldruin/isl29125-rs","last_synced_at":"2025-06-20T03:06:19.874Z","repository":{"id":62441147,"uuid":"253197455","full_name":"eldruin/isl29125-rs","owner":"eldruin","description":"Platform-agnostic Rust driver for the ISL29125 low-power digital RGB color light sensor with IR blocking filter","archived":false,"fork":false,"pushed_at":"2021-06-27T13:45:40.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-16T05:28:54.718Z","etag":null,"topics":["color","driver","embedded-hal-driver","i2c","ir","light","rgb","rust","sensor"],"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}},"created_at":"2020-04-05T09:23:47.000Z","updated_at":"2023-07-25T14:34:27.000Z","dependencies_parsed_at":"2022-11-01T22:01:57.111Z","dependency_job_id":null,"html_url":"https://github.com/eldruin/isl29125-rs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/eldruin/isl29125-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Fisl29125-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Fisl29125-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Fisl29125-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Fisl29125-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldruin","download_url":"https://codeload.github.com/eldruin/isl29125-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Fisl29125-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260868885,"owners_count":23074960,"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":["color","driver","embedded-hal-driver","i2c","ir","light","rgb","rust","sensor"],"created_at":"2024-10-09T05:09:11.582Z","updated_at":"2025-06-20T03:06:14.856Z","avatar_url":"https://github.com/eldruin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust ISL29125 Digital RGB Color Light Sensor with IR Blocking Filter Driver\n\n[![crates.io](https://img.shields.io/crates/v/isl29125.svg)](https://crates.io/crates/isl29125)\n[![Docs](https://docs.rs/isl29125/badge.svg)](https://docs.rs/isl29125)\n[![Build Status](https://github.com/eldruin/isl29125-rs/workflows/Build/badge.svg)](https://github.com/eldruin/isl29125-rs/actions?query=workflow%3ABuild)\n[![Coverage Status](https://coveralls.io/repos/github/eldruin/isl29125-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/isl29125-rs?branch=master)\n\nThis is a platform agnostic Rust driver for the low-power digital RGB color\nlight sensor with IR blocking filter using the [`embedded-hal`] traits.\n\nThis driver allows you to:\n- Read all colors. See: `read()`.\n- Read red/green/blue colors individually. See: `red()`.\n- Set operating mode. See: `set_operating_mode()`.\n- Set ADC resolution. See: `set_resolution()`.\n- Set RGB data sensing range. See: `set_range()`.\n- Set IR filtering. See: `set_ir_filtering()`.\n- Read the status flags. See: `status()`.\n- Clear the status flags. See: `clear_status()`.\n- Read the device ID. See: `device_id()`.\n- Perform a software reset. See: `reset()`.\n- Interrupts:\n    - Set interrupt thresholds. See: `set_interrupt_thresholds()`.\n    - Set interrupt threshold assignment. See: `set_interrupt_threshold_assignment()`.\n    - Set the fault count. See: `set_fault_count()`.\n    - Set interrupt pin mode. See: `set_interrupt_pin_mode()`.\n    - Enable/Disable generating an interrupt after a conversion is done. See: `enable_interrupt_on_conversion_done()`.\n\n\u003c!-- TODO\n[Introductory blog post]()\n--\u003e\n\n## The device\n\nThe ISL29125 is a low power, high sensitivity, RED, GREEN and BLUE color\nlight sensor (RGB) with an I2C (SMBus compatible) interface. Its\nstate-of-the-art photodiode array provides an accurate RGB spectral\nresponse and excellent light source to light source variation (LS2LS).\n\nThe ISL29125 is designed to reject IR in light sources allowing the device\nto operate in environments from sunlight to dark rooms. The integrating\nADC rejects 50Hz and 60Hz flicker caused by artificial light sources.\nA selectable range allows the user to optimize sensitivity suitable for\nthe specific application. In normal operation mode the device consumes\n56μA, which reduces to 0.5μA in power-down mode.\n\nThe ISL29125 supports hardware and software user programmable interrupt\nthresholds. The Interrupt persistency feature reduces false trigger\nnotification.\n\nDatasheet: [ISL29125](https://www.renesas.com/eu/en/www/doc/datasheet/isl29125.pdf)\n\n\n## Usage\n\nTo use this driver, import this crate and an `embedded_hal` implementation,\nthen instantiate the device.\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\nextern crate linux_embedded_hal as hal;\nuse isl29125::{Isl29125, OperatingMode};\n\nfn main() {\n    let dev = hal::I2cdev::new(\"/dev/i2c-1\").unwrap();\n    let mut sensor = Isl29125::new(dev);\n    sensor\n        .set_operating_mode(OperatingMode::RedGreenBlue)\n        .unwrap();\n    loop {\n        let m = sensor.read().unwrap();\n        println!(\"R: {}, G: {}, B: {}\", m.red, m.green, m.blue);\n    }\n}\n```\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/isl29125-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[`embedded-hal`]: https://github.com/rust-embedded/embedded-hal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Fisl29125-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldruin%2Fisl29125-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Fisl29125-rs/lists"}