{"id":17280860,"url":"https://github.com/initerworker/wait-for-input","last_synced_at":"2025-03-26T15:22:29.639Z","repository":{"id":143861861,"uuid":"194895812","full_name":"IniterWorker/wait-for-input","owner":"IniterWorker","description":"Simple Poll Wait For Input","archived":false,"fork":false,"pushed_at":"2019-12-03T21:26:41.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T18:12:37.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/IniterWorker.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":"2019-07-02T16:06:42.000Z","updated_at":"2019-12-03T21:26:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c7b6ca2-521c-4fb9-96aa-9fc3f871d53d","html_url":"https://github.com/IniterWorker/wait-for-input","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/IniterWorker%2Fwait-for-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2Fwait-for-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2Fwait-for-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2Fwait-for-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IniterWorker","download_url":"https://codeload.github.com/IniterWorker/wait-for-input/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245678914,"owners_count":20654738,"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-10-15T09:22:14.485Z","updated_at":"2025-03-26T15:22:29.611Z","avatar_url":"https://github.com/IniterWorker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wait For Input\n\nWait for input; It's a primary tool to configure GPIO and poll events.\n\nDescribe GPIO Poll like button trigger very quickly, easily and clearly.\n\n## Why I wrote it ?\n\nI wrote this tool to avoid the bash spread of export/direction/edge. When I create a yocto solution for embedded purposes, I need to write a simple file to describe buttons and basic events quickly, easily and clearly.\n\n## Dependencies\n\n- LibCJSON\n- API GPIO, sysfs\n\n## Example\n\nCreate a simple hello_world event on push button raising the GPIO.\n\n### GPIO Configuration\n\nSee more examples  `./example`\n\n#### Basic\n```json\n{\n    \"gpios\": [\n        {\n            \"name\": \"btn_helloworld\",\n            \"gpio_number\": 22,\n            \"sh\": \"echo btn helloworld\"\n        }\n    ]\n}\n```\n\n#### Advanced\n\nAdvanced example with curl and avanced options.\n\n```json\n{\n\t\"poll\": {\n\t\t\"maxfd\": 128,\n\t\t\"timeout\": -1\n\t},\n\t\"gpios\": [\n\t\t{\n\t\t\t\"name\": \"btn_reset_inc\",\n\t\t\t\"gpio_number\": 22,\n\t\t\t\"sh\": \"curl -d '+1' -XPATCH https://kvdb.io/${API_TOKEN}/hits\",\n\t\t\t\"edge\": \"falling\",\n\t\t\t\"direction\": \"in\",\n\t\t\t\"debounce\": 200,\n\t\t\t\"allow_already_exported\": true\n\t\t},\n\t\t{\n\t\t\t\"name\": \"btn_dec\",\n\t\t\t\"gpio_number\": 27,\n\t\t\t\"sh\": \"curl -d '-1' -XPATCH https://kvdb.io/${API_TOKEN}/hits\",\n\t\t\t\"edge\": \"falling\",\n\t\t\t\"direction\": \"in\",\n\t\t\t\"debounce\": 2000,\n\t\t\t\"allow_already_exported\": true\n\t\t}\n\t]\n}\n```\n\n__NOTE__ : debounce unit **ms**\n\n### Simple\n\n```sh\nwait_for_input ~/rpi.json\n```\n\n### ToDo\n- Describe non-poll gpios\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiterworker%2Fwait-for-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finiterworker%2Fwait-for-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiterworker%2Fwait-for-input/lists"}