{"id":23507685,"url":"https://github.com/timesplinter/gphpio","last_synced_at":"2025-07-03T21:37:42.106Z","repository":{"id":33984476,"uuid":"37735610","full_name":"TiMESPLiNTER/gphpio","owner":"TiMESPLiNTER","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-29T11:21:14.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T19:22:48.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/TiMESPLiNTER.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":"2015-06-19T17:17:27.000Z","updated_at":"2020-01-16T18:20:49.000Z","dependencies_parsed_at":"2022-07-12T21:33:30.338Z","dependency_job_id":null,"html_url":"https://github.com/TiMESPLiNTER/gphpio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiMESPLiNTER%2Fgphpio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiMESPLiNTER%2Fgphpio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiMESPLiNTER%2Fgphpio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiMESPLiNTER%2Fgphpio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TiMESPLiNTER","download_url":"https://codeload.github.com/TiMESPLiNTER/gphpio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850841,"owners_count":21973667,"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":[],"created_at":"2024-12-25T10:34:02.594Z","updated_at":"2025-05-13T00:40:48.072Z","avatar_url":"https://github.com/TiMESPLiNTER.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gphpio\n\nThis library provides a nice OO interface to interact with the GPIO pins of RaspberryPi (2).\n\n## Setup\n\nFor RaspberryPi (2) please make sure that the files at `/sys/class/gpio` are owned by `root:gpio` and that the user which\nexecutes the PHP script using this library is also in the group `gpio`. This should be the case anyway as long as you have\nalready run the `raspi-config` tool on installation.\n\nElse you may need to apply the following changes [described here](http://www.element14.com/community/message/139528/l/re-piface-digital-2--setup-and-use#139528).\n\n## Example\n\nThe \"Hello world\" LED-blink script would look like that:\n\n```php\n$model = new RPi();\n$gpio = new GPIO($model);\n$pin = 17;\n\nif($gpio-\u003eisExported($pin) === false)\n\t$gpio-\u003eexport($pin, GPIO::MODE_OUTPUT);\n\necho 'This is a ' , $model-\u003egetName() , PHP_EOL;\n\nfor($i = 0; $i \u003c 10; ++$i) {\n\t$gpio-\u003ewrite($pin, 1);\n\techo 'The pin is now: ' , $gpio-\u003eread($pin) , PHP_EOL;\n\tsleep(1);\n\n\t$gpio-\u003ewrite($pin, 0);\n\techo 'The pin is now: ' , $gpio-\u003eread($pin) , PHP_EOL;\n\tsleep(1);\n}\n\n$gpio-\u003eunexport($pin);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimesplinter%2Fgphpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimesplinter%2Fgphpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimesplinter%2Fgphpio/lists"}