{"id":15132814,"url":"https://github.com/cervm/raspi_dart_led_control","last_synced_at":"2026-02-27T11:33:16.442Z","repository":{"id":254758981,"uuid":"847444669","full_name":"cervm/raspi_dart_led_control","owner":"cervm","description":"A minimal command-line application demonstrating GPIO control on a Raspberry Pi using Dart's FFI (Foreign Function Interface) to interact with libgpiod.","archived":false,"fork":false,"pushed_at":"2024-08-26T21:09:15.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T21:45:01.719Z","etag":null,"topics":["dartlang","ffi","gpio","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/cervm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-08-25T20:50:04.000Z","updated_at":"2024-08-26T21:09:18.000Z","dependencies_parsed_at":"2024-12-19T04:32:08.545Z","dependency_job_id":"58dd98a4-fcbd-4aa3-8ba3-0f69ed183a04","html_url":"https://github.com/cervm/raspi_dart_led_control","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"a8267f4524dc2a775b0d072cb7b3a0782f07284f"},"previous_names":["cervm/raspi_dart_led_control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cervm/raspi_dart_led_control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cervm%2Fraspi_dart_led_control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cervm%2Fraspi_dart_led_control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cervm%2Fraspi_dart_led_control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cervm%2Fraspi_dart_led_control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cervm","download_url":"https://codeload.github.com/cervm/raspi_dart_led_control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cervm%2Fraspi_dart_led_control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29892144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"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":["dartlang","ffi","gpio","raspberry-pi"],"created_at":"2024-09-26T04:40:29.990Z","updated_at":"2026-02-27T11:33:16.420Z","avatar_url":"https://github.com/cervm.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Dart LED Control\n\nA minimal command-line application demonstrating GPIO control on a Raspberry Pi using Dart's FFI (Foreign Function Interface) to interact with `libgpiod` v2. This project provides an example of controlling an LED with a push button.\n\nTested on **Raspberry Pi 5** running **Raspberry Pi OS (64-bit)**.\n\n## Demo\n\n[![Video Demo](https://i3.ytimg.com/vi/NhQ8_xI-70U/maxresdefault.jpg)](https://youtu.be/NhQ8_xI-70U)\n\n## Components\n\n- LED\n- 220Ω Resistor\n- Push Button\n\n## Prerequisites\n- Dart SDK installed on your Raspberry Pi.\n- `libgpiod` v2 pre-installed on your Raspberry Pi (needed for GPIO access).\n\n## Limitations\n\n- Only compatible with 64-bit OS.\n- Chip name is hard-coded to `gpiochip4` in `gpio_manager.dart`.\n\n## Running the Application\n\n1. **Connect the Components:**\n   - Connect the LED to a GPIO pin (set to 03 (BCM) in `main.dart`).\n   - Connect the push button to another GPIO pin (set to 21 (BCM) in `main.dart`).\n\n2. **Run the Application:**\n   ```bash\n   dart run bin/main.dart\n   ```\n\n## Usage\n- The LED will blink continuously when the button is not pressed.\n- When the button is pressed, the LED remains lit continuously.\n\n## Project Structure\n\n- **`bin/`**: Contains the main entry point of the application.\n- **`lib/`**: Contains the library code, including FFI bindings and GPIO management logic.\n\n## References\n\n- [Dart FFI Documentation](https://dart.dev/guides/libraries/c-interop)\n- [libgpiod Documentation](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/)\n- [Raspberry Pi GPIO Documentation](https://www.raspberrypi.com/documentation/computers/os.html#use-gpio-from-python)\n- [Raspberry Pi Flutter Installer](https://github.com/Snapp-X/snapp_installer)\n- [libgpiod Example](https://github.com/starnight/libgpiod-example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcervm%2Fraspi_dart_led_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcervm%2Fraspi_dart_led_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcervm%2Fraspi_dart_led_control/lists"}