{"id":17861175,"url":"https://github.com/jonathanstowe/rpi-device-smbus","last_synced_at":"2026-01-30T00:34:59.990Z","repository":{"id":66980499,"uuid":"48769829","full_name":"jonathanstowe/RPi-Device-SMBus","owner":"jonathanstowe","description":"i2c on Raspberry Pi for Raku","archived":false,"fork":false,"pushed_at":"2022-08-08T07:34:31.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T22:24:45.812Z","etag":null,"topics":["i2c","raku","raspberry-pi","smbus"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-29T22:27:27.000Z","updated_at":"2022-08-07T08:41:43.000Z","dependencies_parsed_at":"2023-05-16T10:00:57.314Z","dependency_job_id":null,"html_url":"https://github.com/jonathanstowe/RPi-Device-SMBus","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanstowe/RPi-Device-SMBus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FRPi-Device-SMBus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FRPi-Device-SMBus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FRPi-Device-SMBus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FRPi-Device-SMBus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/RPi-Device-SMBus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FRPi-Device-SMBus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270434850,"owners_count":24583072,"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-08-14T02:00:10.309Z","response_time":75,"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":["i2c","raku","raspberry-pi","smbus"],"created_at":"2024-10-28T08:43:12.086Z","updated_at":"2026-01-30T00:34:59.932Z","avatar_url":"https://github.com/jonathanstowe.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPi::Device::SMBus\n\ni²c on Raspberry Pi for Raku\n\n![Build Status](https://github.com/jonathanstowe/RPi-Device-SMBus/workflows/CI/badge.svg)\n\n## Synopsis\n\n```raku\n\n    use RPi::Device::SMBus;\n\n    # Obviously you will need to actually read the data sheet of your device.\n    my RPi::Device::SMBus $smbus = RPi::Device::SMBus.new(device =\u003e '/dev/i2c-1', address =\u003e 0x54);\n\n    $smbus.write-byte(0x10);\n\n    ....\n\n```\n\n## Description\n\nThis is an SMBus/i²c interface that has been written and tested for\nthe Raspberry Pi, however it uses a fairly generic POSIX interface so if\nyour platform exposes the i²c interface as a character special device\nit may work.\n\nIn order to use this you will need to install and configure the i2c-dev\nkernel module and tools.  On a default Debian image you should be able\nto just do:\n\n    sudo apt-get install libi2c-dev i2c-tools\n\nAnd then edit the ```/etc/modules``` to add the modules by adding:\n\n    i2c-dev \n    i2c-bcm2708\n\nOr for a Raspberry Pi 3\n\n    i2c-dev\n    i2c-bcm2835\n\nAnd then rebooting.\n\nIf you have a more recent raspbian you may alternatively be able to use\n```raspi-config``` where you can turn on ```i2c``` under \"Interfacing Options\".\n\nTypicaly the i2c device will be ```/dev/i2c-1``` on a Raspberry Pi rev\nB. or v2 or ```/dev/i2c-0``` on older versions.\n\nYou can determine the bus address of your device by doing:\n\n    sudo i2cdetect -y 1  # replace the 1 with a 0 for older versions\n\n(Obviously the device should be connected, consult the manual for your\ndevice about this.)\n\nWhich should give you the hexadecimal address of your device.  Some\ndevices may not respond, so you may want to either check the data sheet\nof your device or read the ```i2cdetect``` manual page to get other options.\n\nIt should be noted that because there is no easy way of testing this without\nusing physical devices then it may not work perfectly in all cases, but I'd\nbe delighted to receive patches for any issues found.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to install this with *zef* :\n\n    # From the source directory\n   \n    zef install .\n\n    # Remote installation\n\n    zef install RPi::Device::SMBus\n\nThe tests are likely to completely fail on anything but a Raspberry Pi with the i²c configured as above.\n\n## Support\n\nSuggestions/patches are welcomed via [github](https://github.com/jonathanstowe/RPi-Device-SMBus/issues)\n\n## Licence\n\nThis is free software.\n\nPlease see the [LICENCE](LICENCE) file in the distribution\n\n© Jonathan Stowe 2015 - 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Frpi-device-smbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Frpi-device-smbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Frpi-device-smbus/lists"}