{"id":25346405,"url":"https://github.com/pi4j/pi4j","last_synced_at":"2026-01-24T23:01:44.577Z","repository":{"id":39833756,"uuid":"192591631","full_name":"Pi4J/pi4j","owner":"Pi4J","description":"Pi4J, the Java library to control the GPIOs of the Raspberry Pi","archived":false,"fork":false,"pushed_at":"2025-04-10T16:33:55.000Z","size":4404,"stargazers_count":300,"open_issues_count":57,"forks_count":66,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2025-05-10T09:36:53.380Z","etag":null,"topics":["hacktoberfest","java","javaonraspberrypi","pi4j","raspberrypi"],"latest_commit_sha":null,"homepage":"","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.txt","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,"zenodo":null}},"created_at":"2019-06-18T18:19:21.000Z","updated_at":"2025-04-20T18:59:14.000Z","dependencies_parsed_at":"2023-10-11T14:18:57.946Z","dependency_job_id":"902f2ccb-b5a0-4d60-9ac5-215ff4960077","html_url":"https://github.com/Pi4J/pi4j","commit_stats":{"total_commits":587,"total_committers":26,"mean_commits":"22.576923076923077","dds":0.5911413969335605,"last_synced_commit":"db6a10a33d8ae8592574f6e2ce181cc84826b15e"},"previous_names":["pi4j/pi4j"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pi4J","download_url":"https://codeload.github.com/Pi4J/pi4j/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"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":["hacktoberfest","java","javaonraspberrypi","pi4j","raspberrypi"],"created_at":"2025-02-14T13:25:49.499Z","updated_at":"2026-01-24T23:01:44.533Z","avatar_url":"https://github.com/Pi4J.png","language":"Java","readme":"Pi4J :: Java I/O Library for Raspberry Pi\n==========================================================================\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.pi4j/pi4j-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.pi4j/pi4j-core)\n[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/com.pi4j/pi4j-core?server=https%3A%2F%2Foss.sonatype.org)](https://oss.sonatype.org/#nexus-search;gav~com.pi4j~~~~)\n[![License](https://img.shields.io/github/license/pi4j/pi4j)](http://www.apache.org/licenses/LICENSE-2.0)\n\n[![Site](https://img.shields.io/badge/Website-pi4j.com-green)](https://pi4j.com)\n[![Chat on Slack](https://img.shields.io/badge/Chat-on%20Slack-blue)](https://join.slack.com/t/pi4j/shared_invite/zt-1ttqt8wgj-E6t69qaLrNuCMPLiYnBCsg)\n[![Pi4J on Mastodon](https://img.shields.io/badge/Mastodon-white?logo=mastodon\u0026logoColor=black)](https://foojay.social/@pi4j)\n[![Pi4J on LinkedIn](https://img.shields.io/badge/LinkedIn-white?logo=linkedin\u0026logoColor=black)](https://be.linkedin.com/company/pi4j)\n\nAPI documentation: [![APIdia](https://apidia.net/mvn/com.pi4j/pi4j/badge.svg)](https://apidia.net/mvn/com.pi4j/pi4j)\n\n---\n\n## Project Information for V2+ of Pi4J\n\nProject website: [pi4j.com](https://pi4j.com/).\n\nThis project is intended to provide a **friendly object-oriented I/O API and implementation libraries for Java\nProgrammers** to access the **full I/O capabilities of the Raspberry Pi platform**. This project abstracts the low-level\nnative integration and interrupt monitoring to enable Java programmers to **focus on implementing their application\nbusiness logic**.\n\n![Pi4J diagram](https://pi4j.com/assets/about/home/pi4j-overview.jpg)\n\n* Pi4J Discussions: [github.com/Pi4J/pi4j/discussions](https://github.com/Pi4J/pi4j/discussions)\n* Pi4J Issues: [github.com/Pi4J/pi4j/issues](https://github.com/Pi4J/pi4j/issues)\n\nBuilds are available from:\n\n* [Release builds from Maven Central](http://search.maven.org/#search%7Cga%7C1%7Ccom.pi4j)\n* [Snapshot builds from Sonatype OSS](https://oss.sonatype.org/index.html#nexus-search;quick~pi4j)\n* [Pi4J Downloads](https://pi4j.com/download)\n* [APT/PPA Package Repository downloads](https://github.com/Pi4J/download)\n\n## Using Pi4J\n\nYou need these Java runtimes to use Pi4J:\n\n* Java 11 for V2\n* Java 21 for V3\n* Java 25 for V4\n\nWhen you want to use Pi4J in your project, you should definitely check out [the Pi4J website](https://pi4j.com) where\nyou can find a lot of information and many examples!\n\nFor example, for a minimal example to blink a\nLED ([fully explained here](https://pi4j.com/getting-started/minimal-example-application/)), you need to import the\ndependencies and use this code:\n\n```java\nvar pi4j = Pi4J.newAutoContext();\n\nvar led = pi4j.digitalOutput().create(PIN_LED);\n\nwhile (true) {\n  if (led.state() == DigitalState.HIGH) {\n    led.low();\n  } else {\n    led.high();\n  }\n\n  Thread.sleep(500);\n}\n```\n\n## Contributing to Pi4J\n\nFor full description of the code structure, how to compile... see\nthe [\"About the code\" on our website](https://pi4j.com/architecture/about-the-code/).\n\n![Pi4J code structure](assets/draw.io/pi4j-code-structure.jpg)\n\n### Project Overview\n\nStarting with Pi4J V2, the Pi4J project is prioritizing focus on providing Java programs access, control and\ncommunication with the core I/O capabilities of the Raspberry Pi platform.\n\nRead all about it on [pi4j.com: \"What's New in V2\"](https://www.pi4j.com/about/info-v2/).\n\n### Build Instructions\n\nThe Pi4J codebase can be built using [Apache Maven 3.8+](https://maven.apache.org/).\nand [Java JDK 25 (since V4)](https://openjdk.java.net/).\nThe following command can be used to build the Pi4J JARs:\n\n```\nmvn clean install\n```\n\nPi4J V2+ also includes native libraries that will need to be compiled if you are modifying any native code.\nMost users will never need to compile the native libraries as these artifacts are automatically downloaded  \nwhen building the Pi4J JARs from Maven repositories. One of the following commands can be used to build\nthe Pi4J V2+ JARs and Native Libraries:\n\n```\nmvn clean install -Pnative\nmvn clean install -Pnative,docker\n\n# When you want to speed up...\nmvn clean install -Pnative -DskipTests\n```\n\n\u003e **NOTE:** A comprehensive set of build instructions can be found in\n\u003e the [Pi4J Documentation](https://pi4j.com/architecture/about-the-code/build-instructions/).\n\n### Adding a feature or solving a problem\n\nIf you have an idea to extend and improve Pi4J, please first create a ticket to discuss how\nit fits in the project and how it can be implemented.\n\nIf you find a bug, create a ticket, so we are aware of it and others with the same problem can\ncontribute what they already investigated. And the quickest way to get a fix? Try to search for\nthe cause of the problem or even better provide a code fix!\n\n### Join the team\n\nYou want to become a member of the Pi4J-team? Great idea! Send a short message to frank@pi4j.com\nwith your experience, ideas, and what you would like to contribute to the project.\n\n## Previous Releases\n\n* **Releases**\n  * V1: [github.com/Pi4J/pi4j-v1/releases](https://github.com/Pi4J/pi4j-v1/releases) (archived)\n  * V2+: [github.com/Pi4J/pi4j/releases](https://github.com/Pi4J/pi4j/releases)\n* **Source Code**:\n  * V1: [github.com/Pi4J/pi4j-v1/branches](https://github.com/Pi4J/pi4j-v1/branches) (archived)\n  * V2+: [github.com/Pi4J/pi4j/branches](https://github.com/Pi4J/pi4j/branches)\n\n## License\n\nPi4J Version 2.0 and later is licensed under the Apache License,\nVersion 2.0 (the \"License\"); you may not use this file except in\ncompliance 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\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nCopyright (C) 2012 - 2025 Pi4J\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpi4j%2Fpi4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j/lists"}