{"id":28349762,"url":"https://github.com/mkch/gpio","last_synced_at":"2025-07-12T02:10:08.112Z","repository":{"id":14933924,"uuid":"17658388","full_name":"mkch/gpio","owner":"mkch","description":"Golang implementation of linux GPIO interface.","archived":false,"fork":false,"pushed_at":"2019-09-19T03:28:26.000Z","size":62,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T07:35:47.748Z","etag":null,"topics":["golang","gpio","gpio-library","linux","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"greenkeeperio/website","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkch.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}},"created_at":"2014-03-12T07:09:09.000Z","updated_at":"2023-07-21T20:09:52.000Z","dependencies_parsed_at":"2022-09-02T02:12:52.448Z","dependency_job_id":null,"html_url":"https://github.com/mkch/gpio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkch/gpio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkch%2Fgpio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkch%2Fgpio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkch%2Fgpio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkch%2Fgpio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkch","download_url":"https://codeload.github.com/mkch/gpio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkch%2Fgpio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923642,"owners_count":23683781,"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":["golang","gpio","gpio-library","linux","raspberry-pi"],"created_at":"2025-05-27T20:11:02.132Z","updated_at":"2025-07-12T02:10:08.100Z","avatar_url":"https://github.com/mkch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpio\n\nGolang implementation of linux GPIO interface.\n\n[![GoDoc](https://godoc.org/github.com/mkch/gpio?status.svg)](https://godoc.org/github.com/mkch/gpio)\n\n## Features\n\n- Pure go. No C code. Easy to cross compile(Write code on PC or Mac and deploy the binary on Raspberry Pi etc.).\n\n- Go style API. Receiving GPIO edge events through go channels. Write go code, **NOT** *write c doe with go syntax*.\n  \n- Full implementation of linux GPIO character device interface. Chip info, line info, reading/setting values, active low, open drain, open source, edge events...\n\n- Tested (on my really old **Raspberry Pi Model B Rev 2**).\n\n- Linux GPIO tools(tools/gpio), aka. *lsgpio*, *gpio-event-mon* and *gpio-hammer*, implemented in go. Serve both as code examples and diagnostic tools. See **samples** directory.\n\n- Legacy GPIO sysfs interface(aka. /sys/class/gpio) supporting. See **gpiosysfs** package.\n\n## Requirements\n\n- Go1.13+\n  \n- Linux 4.8+ with GPIO interface to deploy and test.\n\n## Troubleshooting\n\n- `build .: cannot find module for path .` , `undefined: gpio.OpenChip` or something like that:\n\n    If you get this error message from `go build` when building the samples or your own project, you probably need to use `GOOS=linux GOARCH=arm GOARM=6 go build` or something like that.\n\n- `bash: ./lsgpio: cannot execute binary file`:\n  \n  If your shell complains, please run the binary(lsgpio in this example) on linux.\n\n- `failed to set direction of GPIO pin #N: open /sys/class/gpio/gpioN/direction: permission denied`:\n\n  The legacy GPIO sysfs interface may need **root** privilege to operate. Try `sudo`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkch%2Fgpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkch%2Fgpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkch%2Fgpio/lists"}