{"id":18880111,"url":"https://github.com/antoninhrlt/i2clib","last_synced_at":"2026-02-03T04:31:45.439Z","repository":{"id":150901470,"uuid":"437615421","full_name":"antoninhrlt/i2clib","owner":"antoninhrlt","description":"Library for i2c manipulation in Rust. Designed for OLED displays on Raspberry PI [paused dev because my screen is broken]","archived":false,"fork":false,"pushed_at":"2022-04-14T12:53:13.000Z","size":569,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T00:04:17.593Z","etag":null,"topics":["cargo","embedded-systems","i2c-bus","i2c-display","raspberry-pi","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/antoninhrlt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-12-12T17:47:16.000Z","updated_at":"2023-01-18T13:10:55.000Z","dependencies_parsed_at":"2023-11-19T02:34:01.094Z","dependency_job_id":null,"html_url":"https://github.com/antoninhrlt/i2clib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antoninhrlt/i2clib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Fi2clib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Fi2clib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Fi2clib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Fi2clib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoninhrlt","download_url":"https://codeload.github.com/antoninhrlt/i2clib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Fi2clib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29032881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T02:28:16.591Z","status":"ssl_error","status_checked_at":"2026-02-03T02:27:48.904Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cargo","embedded-systems","i2c-bus","i2c-display","raspberry-pi","rust"],"created_at":"2024-11-08T06:41:53.324Z","updated_at":"2026-02-03T04:31:45.397Z","avatar_url":"https://github.com/antoninhrlt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# i2clib\nRust i2c manipulation library designed for Raspberry PI devices. Initial \ncreation made for AZDelivery OLED i2c displays\n\n## Simple Example\nThis library is written in Rust, so in this example we will use the Rust \nlanguage and the Cargo tool. Another language ? Without Cargo ? Let's see the \n[other examples](#other-examples)\n\nGenerate a project with Cargo by running `$ cargo init` in your shell at the\ndirectory you chosen earlier.\nEdit \"Cargo.toml\" file and add the following part:\n```toml\n[dependencies]\ni2clib = { git = \"https://github.com/antoninhrlt/i2clib\" }\n```\n\nNow edit your main file: \"src/main.rs\", it should look like this after:\n```rust\nuse i2clib::*;\n\nfn main() {\n    // nothing to show for the moment\n}\n```\n\n## Good instructions for good usage\n- ### What's my screen's i2c address ?\n    To find your screen's i2c address, simply check on your screen an\n    inscription \"0x...\". Considering being on a 7 bits base, perform this\n    calculation: (example with 0x78 found on your screen, but written as 8 bits\n    hexadecimal number)\n    \u003e 0x78 = 01111000 (as 8 bits in binary) \\\n    \u003e = 0111100 (as 7 bits in binary) = 0x3c (as hexadecimal)\n\n    (from [https://passionelectronique.fr](https://passionelectronique.fr/ecran-oled-i2c-arduino/) in French)\n\n- ### What is my screen's port ?\n  Open a terminal on your Raspberry PI and type: \n  `ls /dev/ | grep \"i2c-\"` and you get for example: `i2c-1`, so \"1\" is your \n  port ! \n\n- ### How to connect my screen ?\n    These are the two most important GPIO ports that we will use.\n\n    \u003cimg src=\"share/i2c-port.svg\"\u003e \n\n    (picture taken from [abelectronics.co.uk](https://www.abelectronics.co.uk/kb/article/1/i2c-part-2---enabling-i-c-on-the-raspberry-pi)\n    , thanks a lot)\n\n    And now connect by cables your screen to the Raspberry PI following this \n    scheme: \n\n    \u003cimg src=\"share/screen-port.png\" width=\"300\"\u003e \n\n    (picture taken from the book \"[AZ-Delivery](https://www.az-delivery.de/fr) 1,3”\n    OLED I2C\", thanks a lot)\n\n    By evidence, you can select another port to connect the black cable \n    (ground) if it's a \"ground\" port, and also for the 3V3 port you can choose\n    another, like emplacement 17, as long as it's a 3V3 port. \n    But the two GPIO ports presented above are the only possibilities to work \n    with i2c.\n\n- ## How to enable i2C on Raspberry PI ?\n    The following instructions are a tutorial to explain how to connect a screen\n    to your Raspberry PI (only with a Linux system like Raspbian). During this\n    tutorial I will considering you don't have any monitor connected and all can \n    be done with the simple shell.\n    - Turn on your Raspberry PI.\n    - Type this in the terminal: `$ sudo raspi-config`, go to \"3 Interface \n    Options\" and then \"P5  I2C\", enable it by press enter two times.\n    [Screenshots here](share/)\n    - Exit the Raspberry's config menu by press \"echap\".\n    - Restart your Raspberry PI.\n    - All done !\n\n# \n\n## Other Examples\n### With the C language\n```c\n// nothing to show for the moment\n```\n\n### Without Cargo but Rust\n```rust\n// nothing to show for the moment\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninhrlt%2Fi2clib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoninhrlt%2Fi2clib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninhrlt%2Fi2clib/lists"}