Minimal example project showing how to use Pi4J V2 with a digital input and output
  • Java 96.9%
  • Fluent 2.4%
  • Shell 0.7%
Find a file
Frank Delporte 6e5263ef0e
Some checks failed
Gradle / build (push) Failing after 27s
Maven / build (push) Failing after 35s
Bump versions
2026-06-06 16:25:35 +02:00
.github/workflows Bump builds to Java 25 2026-02-24 15:58:03 +01:00
.mvn/wrapper Add maven wrapper 2024-10-22 11:34:03 +02:00
assets Breadboard drawing 2020-07-27 12:26:30 +02:00
gradle/wrapper Bump builds to Java 25 2026-02-24 15:58:03 +01:00
src Bump to Pi4J V4 2026-02-24 15:48:25 +01:00
.gitignore Initial Gradle build script 2020-08-12 22:11:06 +02:00
build.gradle Bump builds to Java 25 2026-02-24 15:58:03 +01:00
gradlew Bump dependencies (plugins, pi4j, java) 2024-10-19 10:17:26 +02:00
gradlew.bat Bump dependencies (plugins, pi4j, java) 2024-10-19 10:17:26 +02:00
LICENSE Initial commit 2020-06-11 12:45:12 +02:00
mvnw Add maven wrapper 2024-10-22 11:34:03 +02:00
mvnw.cmd Add maven wrapper 2024-10-22 11:34:03 +02:00
pom.xml Bump versions 2026-06-06 16:25:35 +02:00
README.md Bump versions 2026-06-06 16:25:35 +02:00
settings.gradle Initial Gradle build script 2020-08-12 22:11:06 +02:00

Pi4J :: Java I/O Library for Raspberry Pi :: Minimal example application

GitHub Actions: Maven build Gradle build

This project contains a minimal example application which uses the Pi4J library and uses a digital output (LED) and digital input (push button). The full description is available on the Pi4J website

PROJECT OVERVIEW

The goal of the example project is to show how to set up a Pi4J Maven / Gradle project for the Raspberry Pi.

WIRING

The application needs a LED connected on BCM 22 and button on BCM 24.

Breadboard schematics used in this example

BUILD DEPENDENCIES & INSTRUCTIONS

This project can be built with Maven and Gradle, which is fully described with step-by-step instructions on the Pi4J website > Getting started with Pi4J > Minimal example application.

LICENSE

Pi4J Version 2.0 and later is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.