{"id":20427091,"url":"https://github.com/pi4j/pi4j-example-fxgl","last_synced_at":"2025-04-12T19:10:37.607Z","repository":{"id":52255019,"uuid":"341175027","full_name":"Pi4J/pi4j-example-fxgl","owner":"Pi4J","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-17T12:11:58.000Z","size":4315,"stargazers_count":4,"open_issues_count":10,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T14:03:03.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pi4J.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}},"created_at":"2021-02-22T11:19:34.000Z","updated_at":"2024-03-20T12:35:10.000Z","dependencies_parsed_at":"2024-03-25T14:16:25.034Z","dependency_job_id":"719318cd-3782-4fba-bbc8-f9b053ceeaef","html_url":"https://github.com/Pi4J/pi4j-example-fxgl","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/Pi4J%2Fpi4j-example-fxgl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-fxgl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-fxgl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-fxgl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pi4J","download_url":"https://codeload.github.com/Pi4J/pi4j-example-fxgl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618277,"owners_count":21134200,"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-11-15T07:18:54.493Z","updated_at":"2025-04-12T19:10:37.587Z","avatar_url":"https://github.com/Pi4J.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pi4J V2 :: Java I/O Library for Raspberry Pi :: Example game application with FXGL\n===================================================================================\n\n[![Build Status](https://github.com/pi4j/pi4j-example-fxgl/workflows/Maven/badge.svg)](https://github.com/Pi4J/pi4j-example-fxgl/actions/workflows/maven.yml)\n\nThis project contains an example application which uses the Pi4J (V2) library and uses an Arcade button and joystick kit\nto control a JavaFX FXGL game. Full description is available on\n[the Pi4J website](https://pi4j.com/getting-started/fxgl/)\n\n## PROJECT OVERVIEW\n\nThe goal of the example project is to show how to set up a Pi4J Maven for the Raspberry Pi with JavaFX and some physical\nbuttons.\n\nThe full description is available on\n[Game development with FXGL](https://pi4j.com/getting-started/fxgl/).\n\n## COMPONENTS\n\n![Arcade kit components](assets/arcade_parts_kit.jpg)\n![Picade Hat](assets/picade_hat.jpg)\n\nConnections as documented on [pinout.xyz](https://pinout.xyz/pinout/picade_hat):\n\n![Picade Hat pin numbers](assets/picade_hat_pin_numbers.png)\n\n## RUNTIME DEPENDENCIES\n\nThis project uses Pi4J V.2 which has the following runtime dependency requirements:\n\n- [**SLF4J (API)**](https://www.slf4j.org/)\n- [**SLF4J-SIMPLE**](https://www.slf4j.org/)\n\nAs this application has a JavaFX user interface, the project requires the OpenJFX runtime. When the package is build,\nthen the runtime is downloaded and added to the distribution directory.\n\n## BUILD DEPENDENCIES \u0026 INSTRUCTIONS\n\nThis project can be built with [Apache Maven](https://maven.apache.org/) 3.6 (or later) and Java 17 OpenJDK (or later).\nThese prerequisites must be installed prior to building this project. The following command can be used to download all\nproject dependencies and compile the Java module. You can build this project directly on a Raspberry Pi with Java 17+.\n\n```bash\nmvn clean package\n```\n\n### Compiled application to run on the Raspberry Pi\n\nOnce the build is complete and was successful, you can find the compiled artifacts in the `target` folder. Specifically\nall dependency modules (JARs) and a simple `run.sh` bash script will be located in the `target/distribution` folder.\nThis folder contains all the required files needed to distribute (copy) to your Raspberry Pi to run this project.\n\nFor your convenience, this `distribution` folder is zipped up, and is also located in the `target/` folder. Copy this\nfile to your Raspberry Pi, for example with the following command:\n\n```bash\nrsync target/pi4j-example-fxgl-0.0.1.zip pi@192.8.0.124:.\n```\n\nThen on the Raspberry Pi unzip the file with the following command:\n\n```bash\nunzip pi4j-example-fxgl-0.0.1.zip\n```\n\nNow the example can be started with the following command:\n\n```bash\ncd pi4j-example-fxgl-0.0.1/\n./run.sh\n```\n\n*Note:* If you are using the native bindings running locally on the Raspberry Pi, then you may have to run the program\nusing `sudo` to gain the necessary access permissions to the hardware I/O.\n\nThis is the list of files created by the build process of this example application:\n\n* pi4j-core\n* pi4j-example-fxgl\n* pi4j-library-gpiod\n* pi4j-plugin-gpiod\n* pi4j-plugin-raspberrypi\n* slf4j-api\n* slf4j-simple\n* javafx-*\n* and additional dependencies required for JavaFX and FXGL\n* run.sh --\u003e this is the actual start file which will run pi4j-example-fxgl\n\n## LICENSE\n\nPi4J Version 2.0 and later is licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file\nexcept in compliance with the License. You may obtain a copy of the License at:\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"\nAS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific\nlanguage governing permissions and limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j-example-fxgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpi4j%2Fpi4j-example-fxgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j-example-fxgl/lists"}