{"id":21598945,"url":"https://github.com/stovent/lua-gpio","last_synced_at":"2026-01-25T18:32:04.253Z","repository":{"id":126703852,"uuid":"163010244","full_name":"Stovent/Lua-GPIO","owner":"Stovent","description":"A Lua library to use the GPIO pins of a raspberry pi","archived":false,"fork":false,"pushed_at":"2024-06-14T05:03:36.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T11:51:36.435Z","etag":null,"topics":["c","gpio","gpio-pins","lua","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"C","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/Stovent.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":"2018-12-24T17:06:35.000Z","updated_at":"2024-06-14T05:03:39.000Z","dependencies_parsed_at":"2024-06-12T23:57:12.948Z","dependency_job_id":"ae5068ef-3e54-44d2-8630-99aacb64ad83","html_url":"https://github.com/Stovent/Lua-GPIO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Stovent/Lua-GPIO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stovent%2FLua-GPIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stovent%2FLua-GPIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stovent%2FLua-GPIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stovent%2FLua-GPIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stovent","download_url":"https://codeload.github.com/Stovent/Lua-GPIO/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stovent%2FLua-GPIO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: 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":["c","gpio","gpio-pins","lua","raspberry-pi"],"created_at":"2024-11-24T18:13:37.028Z","updated_at":"2026-01-25T18:32:04.237Z","avatar_url":"https://github.com/Stovent.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lua-GPIO\nA Lua library to use the GPIO pins of a Raspberry Pi.\n\nIt only works on Raspberry Pi with Raspberry Pi OS (Raspbian).\n\nThis library only supports setting the GPIO pins as input and output, it does not support the alternative functions yet (SPI, UART, ...).\n\nIt has been benchmarked on a Raspberry Pi 3 B and an oscilloscope, the GPIO C code reached 6Mhz toggles (pin on/pin off), and Lua code reached 1Mhz toggles.\n\n## Install\nClone the repo with `git clone https://github.com/Stovent/Lua-GPIO`.\n\nGo into the the folder and install the dependencies with `sudo apt install liblua5.2-dev`.\nThe minimal supported Lua version is 5.2.\n\nCompile and install the library with\n```sh\nmake\nsudo make install\n```\n\nThe library will be installed at `/usr/local/lib/libLua-GPIO.so` by default.\nTo change the directory and name, open `Makefile` and set the `installDir` and `libName` variables respectively.\n\nUninstall the library with\n```sh\nsudo make uninstall\n```\n\n## How to use\nLoad the library with `luagpio = package.loadlib(\"/usr/local/lib/libLua-GPIO.so\", \"luaopen_luagpio\")()`. Functions will be accessible with `luagpio.\u003cfunction name\u003e()`.\n\nThe pin numbers are the BCM numbers. Check `https://pinout.xyz/` for number reference (GPIO 0-27).\n\n## Docs\n`initPin(pinNumber, mode)`: Set pin to either input or output. If `mode = false`, pin will be an input. true will set the pin to output.\n\n`setPin(pinNumber, value)`: If `value = false`, switch pin off. true will switch the pin on.\n\n`getPin(pinNumber)`: Returns true if the pin is set, false otherwise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstovent%2Flua-gpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstovent%2Flua-gpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstovent%2Flua-gpio/lists"}